Merge pull request #53404 from Mic92/xsslock
nixos/xss-lock: specify a default locker
This commit is contained in:
commit
8a2389e4a1
|
@ -9,7 +9,8 @@ in
|
||||||
options.programs.xss-lock = {
|
options.programs.xss-lock = {
|
||||||
enable = mkEnableOption "xss-lock";
|
enable = mkEnableOption "xss-lock";
|
||||||
lockerCommand = mkOption {
|
lockerCommand = mkOption {
|
||||||
example = "xlock";
|
default = "${pkgs.i3lock}/bin/i3lock";
|
||||||
|
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
|
||||||
type = types.string;
|
type = types.string;
|
||||||
description = "Locker to be used with xsslock";
|
description = "Locker to be used with xsslock";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,6 @@ with lib;
|
||||||
machine = {
|
machine = {
|
||||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||||
programs.xss-lock.enable = true;
|
programs.xss-lock.enable = true;
|
||||||
programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock";
|
|
||||||
services.xserver.displayManager.auto.user = "alice";
|
services.xserver.displayManager.auto.user = "alice";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,6 +19,6 @@ with lib;
|
||||||
|
|
||||||
$machine->fail("pgrep xlock");
|
$machine->fail("pgrep xlock");
|
||||||
$machine->succeed("su -l alice -c 'xset dpms force standby'");
|
$machine->succeed("su -l alice -c 'xset dpms force standby'");
|
||||||
$machine->waitUntilSucceeds("pgrep xlock");
|
$machine->waitUntilSucceeds("pgrep i3lock");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue