at 25.11-pre 1.4 kB view raw
1{ lib, ... }: 2{ 3 name = "qtile"; 4 5 meta = { 6 maintainers = with lib.maintainers; [ sigmanificient ]; 7 }; 8 9 nodes.machine = 10 { pkgs, lib, ... }: 11 let 12 # We create a custom Qtile configuration file that adds a widget from 13 # qtile-extras to the bar. This ensure that the qtile-extras package 14 # also works, and that extraPackages behave as expected. 15 16 config-deriv = pkgs.callPackage ./config.nix { }; 17 in 18 { 19 imports = [ 20 ../common/x11.nix 21 ../common/user-account.nix 22 ]; 23 test-support.displayManager.auto.user = "alice"; 24 25 services.xserver.windowManager.qtile = { 26 enable = true; 27 configFile = "${config-deriv}/config.py"; 28 extraPackages = ps: [ ps.qtile-extras ]; 29 }; 30 31 services.displayManager.defaultSession = lib.mkForce "qtile"; 32 33 environment.systemPackages = [ pkgs.kitty ]; 34 }; 35 36 testScript = '' 37 with subtest("ensure x starts"): 38 machine.wait_for_x() 39 machine.wait_for_file("/home/alice/.Xauthority") 40 machine.succeed("xauth merge ~alice/.Xauthority") 41 42 with subtest("ensure client is available"): 43 machine.succeed("qtile --version") 44 45 with subtest("ensure we can open a new terminal"): 46 machine.sleep(2) 47 machine.send_key("meta_l-ret") 48 machine.wait_for_window(r"alice.*?machine") 49 machine.sleep(2) 50 machine.screenshot("terminal") 51 ''; 52}