3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/vbox: Start X server with user "alice"

The VirtualBox tests so far ran the X server as root instead of user
"alice" and it did work, because we had access control turned off by
default.

Fortunately, it was changed in 1541fa351b.

As a side effect, it caused all the VirtualBox tests to fail because
they now can't connect to the X server, which is a good thing because
it's a bug of the VirtualBox tests.

So to fix it, let's just start the X server as user alice.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2016-05-26 15:03:01 +02:00
parent cb796ccd09
commit ecd3cbb9e7
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -326,6 +326,7 @@ let
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs; in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
virtualisation.memorySize = 2048; virtualisation.memorySize = 2048;
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
services.xserver.displayManager.auto.user = "alice";
users.extraUsers.alice.extraGroups = let users.extraUsers.alice.extraGroups = let
inherit (config.virtualisation.virtualbox.host) enableHardening; inherit (config.virtualisation.virtualbox.host) enableHardening;
in lib.mkIf enableHardening (lib.singleton "vboxusers"); in lib.mkIf enableHardening (lib.singleton "vboxusers");