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