nixpkgs/nixos/tests/xss-lock.nix
Jörg Thalheim 2614c8a6c5
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.
2019-01-05 16:42:30 +01:00

24 lines
601 B
Nix

import ./make-test.nix ({ pkgs, lib, ... }:
with lib;
{
name = "xss-lock";
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
machine = {
imports = [ ./common/x11.nix ./common/user-account.nix ];
programs.xss-lock.enable = true;
services.xserver.displayManager.auto.user = "alice";
};
testScript = ''
$machine->start;
$machine->waitForX;
$machine->waitForUnit("xss-lock.service", "alice");
$machine->fail("pgrep xlock");
$machine->succeed("su -l alice -c 'xset dpms force standby'");
$machine->waitUntilSucceeds("pgrep i3lock");
'';
})