fix(sway): swaylock unlable to unlock when installed on non-NixOS

This commit is contained in:
Yorick Barbanneau 2025-08-25 23:58:13 +02:00
parent 6a8beb894d
commit 94fce63f6f
Signed by: ephase
GPG key ID: 246042E52B41FFCF

View file

@ -10,7 +10,7 @@ in
timeouts = [ timeouts = [
{ {
timeout = 300; timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -f"; command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
{ {
timeout = 600; timeout = 600;
@ -21,11 +21,11 @@ in
events = [ events = [
{ {
event = "before-sleep"; event = "before-sleep";
command = if cfg.swaylock.useNullPackage then "swaylock" else "${pkgs.swaylock}/bin/swaylock"; command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
{ {
event = "lock"; event = "lock";
command = if cfg.swaylock.useNullPackage then "swaylock" else "${pkgs.swaylock}/bin/swaylock"; command = if cfg.swaylock.useNullPackage then ''usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
} }
]; ];
}; };