import ./make-test.nix ({ pkgs, ...} : { name = "slim"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ aszlig ]; }; machine = { pkgs, ... }: { imports = [ ./common/user-account.nix ]; services.xserver.enable = true; services.xserver.windowManager.default = "icewm"; services.xserver.windowManager.icewm.enable = true; services.xserver.desktopManager.default = "none"; services.xserver.displayManager.slim = { enable = true; # Use a custom theme in order to get best OCR results theme = pkgs.runCommand "slim-theme-ocr" { nativeBuildInputs = [ pkgs.imagemagick ]; } '' mkdir "$out" convert -size 1x1 xc:white "$out/background.jpg" convert -size 200x100 xc:white "$out/panel.jpg" cat > "$out/slim.theme" <waitForText(qr/Username:/); $machine->sendChars("${user.name}\n"); $machine->waitForText(qr/Password:/); $machine->sendChars("${user.password}\n"); $machine->waitForFile('${user.home}/.Xauthority'); $machine->succeed('xauth merge ${user.home}/.Xauthority'); $machine->waitForWindow('^IceWM '); # Make sure SLiM doesn't create a log file $machine->fail('test -e /var/log/slim.log'); ''; })