2018-11-11 08:41:11 +00:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
2017-03-24 15:38:16 +00:00
|
|
|
|
2019-11-07 01:55:18 +00:00
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
2017-03-24 15:38:16 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
default = {
|
|
|
|
name = "sddm";
|
|
|
|
|
2022-03-20 23:15:30 +00:00
|
|
|
nodes.machine = { ... }: {
|
2017-03-24 15:38:16 +00:00
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager.sddm.enable = true;
|
|
|
|
services.displayManager.defaultSession = "none+icewm";
|
2017-03-24 15:38:16 +00:00
|
|
|
services.xserver.windowManager.icewm.enable = true;
|
|
|
|
};
|
2015-11-22 18:48:37 +00:00
|
|
|
|
2017-03-24 15:38:16 +00:00
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript = { nodes, ... }: let
|
2023-06-23 15:41:57 +01:00
|
|
|
user = nodes.machine.users.users.alice;
|
2017-03-24 15:38:16 +00:00
|
|
|
in ''
|
2019-11-07 01:55:18 +00:00
|
|
|
start_all()
|
2019-11-12 17:46:02 +00:00
|
|
|
machine.wait_for_text("(?i)select your user")
|
2019-11-07 01:55:18 +00:00
|
|
|
machine.screenshot("sddm")
|
|
|
|
machine.send_chars("${user.password}\n")
|
2023-06-23 15:41:57 +01:00
|
|
|
machine.wait_for_file("/tmp/xauth_*")
|
|
|
|
machine.succeed("xauth merge /tmp/xauth_*")
|
2019-11-07 01:55:18 +00:00
|
|
|
machine.wait_for_window("^IceWM ")
|
2017-03-24 15:38:16 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
autoLogin = {
|
|
|
|
name = "sddm-autologin";
|
2021-01-10 19:08:30 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2017-03-24 15:38:16 +00:00
|
|
|
maintainers = [ ttuegel ];
|
|
|
|
};
|
|
|
|
|
2022-03-20 23:15:30 +00:00
|
|
|
nodes.machine = { ... }: {
|
2017-03-24 15:38:16 +00:00
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager = {
|
2020-04-12 11:43:50 +01:00
|
|
|
sddm.enable = true;
|
2017-03-24 15:38:16 +00:00
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
|
|
|
};
|
|
|
|
};
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager.defaultSession = "none+icewm";
|
2017-03-24 15:38:16 +00:00
|
|
|
services.xserver.windowManager.icewm.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-06-23 15:41:57 +01:00
|
|
|
testScript = { nodes, ... }: ''
|
2019-11-07 01:55:18 +00:00
|
|
|
start_all()
|
2023-06-23 15:41:57 +01:00
|
|
|
machine.wait_for_file("/tmp/xauth_*")
|
|
|
|
machine.succeed("xauth merge /tmp/xauth_*")
|
2019-11-07 01:55:18 +00:00
|
|
|
machine.wait_for_window("^IceWM ")
|
2017-03-24 15:38:16 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.mapAttrs (lib.const makeTest) tests
|