* Factor out the X11 configuration.
svn path=/nixos/trunk/; revision=19241
This commit is contained in:
parent
73668f41da
commit
bc238be01a
|
@ -54,21 +54,11 @@ rec {
|
||||||
import ./eval-config.nix {
|
import ./eval-config.nix {
|
||||||
inherit nixpkgs services system;
|
inherit nixpkgs services system;
|
||||||
modules = configurations ++
|
modules = configurations ++
|
||||||
[ ../modules/virtualisation/qemu-vm.nix # !!!
|
[ ../modules/virtualisation/qemu-vm.nix
|
||||||
../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
|
../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
|
||||||
|
{ key = "no-manual"; services.nixosManual.enable = false; }
|
||||||
];
|
];
|
||||||
extraArgs = { inherit nodes; };
|
extraArgs = { inherit nodes; };
|
||||||
/* !!! bug in the module/option handling: this ignores the
|
|
||||||
config from assignIPAddresses. Too much magic.
|
|
||||||
configuration = {
|
|
||||||
imports = [configuration "${nixos}/modules/virtualisation/qemu-vm.nix"];
|
|
||||||
config = {
|
|
||||||
# We don't need the manual in a test VM, and leaving it out
|
|
||||||
# speeds up evaluation quite a bit.
|
|
||||||
services.nixosManual.enable = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,7 +78,8 @@ rec {
|
||||||
hosts = lib.concatMapStrings (m: "${m.second} ${m.first}\n") machinesWithIP;
|
hosts = lib.concatMapStrings (m: "${m.second} ${m.first}\n") machinesWithIP;
|
||||||
|
|
||||||
nodes_ = map (m: lib.nameValuePair m.first [
|
nodes_ = map (m: lib.nameValuePair m.first [
|
||||||
{ config =
|
{ key = "ip-address";
|
||||||
|
config =
|
||||||
{ networking.hostName = m.first;
|
{ networking.hostName = m.first;
|
||||||
networking.interfaces =
|
networking.interfaces =
|
||||||
[ { name = "eth1";
|
[ { name = "eth1";
|
||||||
|
@ -96,7 +87,6 @@ rec {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
networking.extraHosts = hosts;
|
networking.extraHosts = hosts;
|
||||||
services.nixosManual.enable = false; # !!!
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.getAttr m.first nodes)
|
(lib.getAttr m.first nodes)
|
||||||
|
|
13
tests/common/x11.nix
Normal file
13
tests/common/x11.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Automatically log in.
|
||||||
|
services.xserver.displayManager.slim.enable = false;
|
||||||
|
services.xserver.displayManager.auto.enable = true;
|
||||||
|
|
||||||
|
# Use IceWM as the window manager.
|
||||||
|
services.xserver.windowManager.default = "icewm";
|
||||||
|
services.xserver.windowManager.icewm.enable = true;
|
||||||
|
|
||||||
|
# Don't use a desktop manager.
|
||||||
|
services.xserver.desktopManager.default = "none";
|
||||||
|
}
|
|
@ -5,15 +5,7 @@
|
||||||
machine =
|
machine =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{ services.xserver.enable = true;
|
{ require = [ ./common/x11.nix ];
|
||||||
services.xserver.displayManager.slim.enable = false;
|
|
||||||
services.xserver.displayManager.auto.enable = true;
|
|
||||||
|
|
||||||
services.xserver.windowManager.default = "icewm";
|
|
||||||
services.xserver.windowManager.icewm.enable = true;
|
|
||||||
|
|
||||||
services.xserver.desktopManager.default = "none";
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.firefox ];
|
environment.systemPackages = [ pkgs.firefox ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ rec {
|
||||||
client =
|
client =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{ services.xserver.enable = true;
|
{ require = [ ./common/x11.nix ];
|
||||||
services.xserver.driSupport = true;
|
services.xserver.driSupport = true;
|
||||||
services.xserver.defaultDepth = pkgs.lib.mkOverride 0 {} 16;
|
services.xserver.defaultDepth = pkgs.lib.mkOverride 0 {} 16;
|
||||||
environment.systemPackages = [ pkgs.icewm pkgs.quake3demo ];
|
environment.systemPackages = [ pkgs.icewm pkgs.quake3demo ];
|
||||||
|
@ -38,10 +38,8 @@ rec {
|
||||||
|
|
||||||
sleep 20;
|
sleep 20;
|
||||||
|
|
||||||
$client1->execute("DISPLAY=:0.0 icewm &");
|
|
||||||
$client1->execute("DISPLAY=:0.0 quake3 '+set r_fullscreen 0' '+set name Foo' '+connect server' &");
|
$client1->execute("DISPLAY=:0.0 quake3 '+set r_fullscreen 0' '+set name Foo' '+connect server' &");
|
||||||
|
|
||||||
$client2->execute("DISPLAY=:0.0 icewm &");
|
|
||||||
$client2->execute("DISPLAY=:0.0 quake3 '+set r_fullscreen 0' '+set name Bar' '+connect server' &");
|
$client2->execute("DISPLAY=:0.0 quake3 '+set r_fullscreen 0' '+set name Bar' '+connect server' &");
|
||||||
|
|
||||||
sleep 40;
|
sleep 40;
|
||||||
|
|
Loading…
Reference in a new issue