nixpkgs/tests/kde4.nix
Eelco Dolstra 497760b444 * Use scrot to make screenshots.
* Another X11 test (running Quake 3).

svn path=/nixos/trunk/; revision=16949
2009-09-02 23:16:33 +00:00

57 lines
1.4 KiB
Nix

{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
, system ? builtins.currentSystem
}:
with import ../lib/build-vms.nix { inherit nixos nixpkgs services system; };
rec {
nodes =
{ client =
{ config, pkgs, ... }:
{ services.xserver.enable = true;
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.kdm.enable = true;
services.xserver.displayManager.kdm.extraConfig =
''
[X-:0-Core]
AutoLoginEnable=true
AutoLoginUser=alice
AutoLoginPass=foobar
'';
services.xserver.desktopManager.default = "kde4";
services.xserver.desktopManager.kde4.enable = true;
users.extraUsers = pkgs.lib.singleton
{ name = "alice";
description = "Alice Foobar";
home = "/home/alice";
createHome = true;
useDefaultShell = true;
password = "foobar";
};
environment.systemPackages = [ pkgs.scrot ];
};
};
vms = buildVirtualNetwork { inherit nodes; };
test = runTests vms
''
startAll;
$client->waitForFile("/tmp/.X11-unix/X0");
sleep 60;
print STDERR $client->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen.png");
'';
}