at 23.11-pre 1.1 kB view raw
1import ./make-test-python.nix ({ lib, ... }: { 2 name = "xmonad-xdg-autostart"; 3 meta.maintainers = with lib.maintainers; [ oxalica ]; 4 5 nodes.machine = { pkgs, config, ... }: { 6 imports = [ ./common/x11.nix ./common/user-account.nix ]; 7 test-support.displayManager.auto.user = "alice"; 8 services.xserver.displayManager.defaultSession = "none+xmonad"; 9 services.xserver.windowManager.xmonad.enable = true; 10 services.xserver.desktopManager.runXdgAutostartIfNone = true; 11 12 environment.systemPackages = [ 13 (pkgs.writeTextFile { 14 name = "test-xdg-autostart"; 15 destination = "/etc/xdg/autostart/test-xdg-autostart.desktop"; 16 text = '' 17 [Desktop Entry] 18 Name=test-xdg-autoatart 19 Type=Application 20 Terminal=false 21 Exec=${pkgs.coreutils}/bin/touch ${config.users.users.alice.home}/xdg-autostart-executed 22 ''; 23 }) 24 ]; 25 }; 26 27 testScript = { nodes, ... }: 28 let 29 user = nodes.machine.config.users.users.alice; 30 in 31 '' 32 machine.wait_for_x() 33 machine.wait_for_file("${user.home}/xdg-autostart-executed") 34 ''; 35})