From c1ebdb5dd8add4f2f7ae40c4f02eca0703c683ef Mon Sep 17 00:00:00 2001 From: Thomas BESSOU Date: Mon, 16 Jun 2025 12:03:00 +0200 Subject: [PATCH] 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 https://github.com/NixOS/nixpkgs/commit/317c972e8af2092c95e1f30028f8b7366b4ab4b9#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 e82c7e5b8350bb36e56091477541a1d89763f46b) --- nixos/modules/services/x11/window-managers/i3.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix index 47c927b85456..ea594a1ee585 100644 --- a/nixos/modules/services/x11/window-managers/i3.nix +++ b/nixos/modules/services/x11/window-managers/i3.nix @@ -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;