mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-09 07:13:03 +00:00
8343b8b902
svn path=/nixos/trunk/; revision=19228
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
machine =
|
|
{ config, pkgs, ... }:
|
|
|
|
{ services.xserver.enable = true;
|
|
|
|
services.httpd.enable = true;
|
|
services.httpd.adminAddr = "foo@example.org";
|
|
services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
|
|
|
|
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";
|
|
};
|
|
};
|
|
|
|
testScript =
|
|
''
|
|
$machine->waitForFile("/tmp/.X11-unix/X0");
|
|
|
|
sleep 70;
|
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
|
|
|
|
sleep 10;
|
|
|
|
$machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
|
|
|
|
sleep 10;
|
|
|
|
$machine->screenshot("screen");
|
|
'';
|
|
|
|
}
|