at master 1.1 kB view raw
1{ lib, ... }: 2{ 3 name = "ragnarwm"; 4 5 meta = { 6 maintainers = with lib.maintainers; [ sigmanificient ]; 7 }; 8 9 nodes.machine = 10 { pkgs, lib, ... }: 11 { 12 imports = [ 13 ./common/x11.nix 14 ./common/user-account.nix 15 ]; 16 test-support.displayManager.auto.user = "alice"; 17 services.displayManager.defaultSession = lib.mkForce "ragnar"; 18 services.xserver.windowManager.ragnarwm.enable = true; 19 20 # Setup the default terminal of Ragnar 21 environment.systemPackages = [ pkgs.alacritty ]; 22 }; 23 24 testScript = '' 25 with subtest("ensure x starts"): 26 machine.wait_for_x() 27 machine.wait_for_file("/home/alice/.Xauthority") 28 machine.succeed("xauth merge ~alice/.Xauthority") 29 30 with subtest("ensure we can open a new terminal"): 31 # Sleeping a bit before the test, as it may help for sending keys 32 machine.sleep(2) 33 machine.send_key("meta_l-ret") 34 machine.wait_for_window(r"alice.*?machine") 35 machine.sleep(2) 36 machine.screenshot("terminal") 37 ''; 38}