mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
nixos/xss-lock: specify a default locker
Having a default locker is less error-prone and more convenient. Incorrect values might leave the machine vulnerable since there is no fallback.
This commit is contained in:
parent
82e204382f
commit
2614c8a6c5
@ -9,7 +9,8 @@ in
|
||||
options.programs.xss-lock = {
|
||||
enable = mkEnableOption "xss-lock";
|
||||
lockerCommand = mkOption {
|
||||
example = "xlock";
|
||||
default = "${pkgs.i3lock}/bin/i3lock";
|
||||
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
|
||||
type = types.string;
|
||||
description = "Locker to be used with xsslock";
|
||||
};
|
||||
|
@ -9,7 +9,6 @@ with lib;
|
||||
machine = {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
programs.xss-lock.enable = true;
|
||||
programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock";
|
||||
services.xserver.displayManager.auto.user = "alice";
|
||||
};
|
||||
|
||||
@ -20,6 +19,6 @@ with lib;
|
||||
|
||||
$machine->fail("pgrep xlock");
|
||||
$machine->succeed("su -l alice -c 'xset dpms force standby'");
|
||||
$machine->waitUntilSucceeds("pgrep xlock");
|
||||
$machine->waitUntilSucceeds("pgrep i3lock");
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user