nixos/i3: fix i3lock default enable-ing

Prior to this commit, i3lock was enabled by default in a way that doesn't work as of 317c972e8a (diff-aef862f6fd2c25092a3f17f974d8757285bf7baff6b80822cd142b7de1903ccfR451-R454)
Users attempting to use i3lock with this default setup would get locked out of their system.

This fixes it by enabling i3lock via its `programs` option instead of specifying the package directly.

Discussion over at https://github.com/NixOS/nixpkgs/issues/401891#issuecomment-2963378189

(cherry picked from commit e82c7e5b83)
This commit is contained in:
Thomas BESSOU
2025-06-16 12:03:00 +02:00
committed by github-actions[bot]
parent 32bdb09f95
commit c1ebdb5dd8

View File

@@ -52,13 +52,11 @@ in
default = with pkgs; [
dmenu
i3status
i3lock
];
defaultText = literalExpression ''
with pkgs; [
dmenu
i3status
i3lock
]
'';
description = ''
@@ -81,6 +79,7 @@ in
'';
}
];
programs.i3lock.enable = mkDefault true;
environment.systemPackages = [ cfg.package ] ++ cfg.extraPackages;
environment.etc."i3/config" = mkIf (cfg.configFile != null) {
source = cfg.configFile;