nixos/tests/virtualbox: Don't use vboxusers group.

At least when we're running in hardening mode, because it's needed there
only for USB support.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-12-18 13:39:38 +01:00
parent 2af435b5cd
commit ef691d5c30
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961

View File

@ -297,14 +297,16 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
in {
name = "virtualbox";
machine = { pkgs, ... }: {
machine = { pkgs, lib, config, ... }: {
imports = let
mkVMConf = name: val: val.machine // { key = "${name}-config"; };
vmConfigs = mapAttrsToList mkVMConf vboxVMs;
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
virtualisation.memorySize = 768;
services.virtualboxHost.enable = true;
users.extraUsers.alice.extraGroups = [ "vboxusers" ];
users.extraUsers.alice.extraGroups = let
inherit (config.services.virtualboxHost) enableHardening;
in lib.mkIf enableHardening (lib.singleton "vboxusers");
};
testScript = ''