at 18.09-beta 669 B view raw
1import ./make-test.nix ({ pkgs, lib, ... }: 2 3with lib; 4 5{ 6 name = "xss-lock"; 7 meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ]; 8 9 machine = { 10 imports = [ ./common/x11.nix ./common/user-account.nix ]; 11 programs.xss-lock.enable = true; 12 programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock"; 13 services.xserver.displayManager.auto.user = "alice"; 14 }; 15 16 testScript = '' 17 $machine->start; 18 $machine->waitForX; 19 $machine->waitForUnit("xss-lock.service", "alice"); 20 21 $machine->fail("pgrep xlock"); 22 $machine->succeed("su -l alice -c 'xset dpms force standby'"); 23 $machine->waitUntilSucceeds("pgrep xlock"); 24 ''; 25})