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:
parent
2af435b5cd
commit
ef691d5c30
@ -297,14 +297,16 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
|||||||
in {
|
in {
|
||||||
name = "virtualbox";
|
name = "virtualbox";
|
||||||
|
|
||||||
machine = { pkgs, ... }: {
|
machine = { pkgs, lib, config, ... }: {
|
||||||
imports = let
|
imports = let
|
||||||
mkVMConf = name: val: val.machine // { key = "${name}-config"; };
|
mkVMConf = name: val: val.machine // { key = "${name}-config"; };
|
||||||
vmConfigs = mapAttrsToList mkVMConf vboxVMs;
|
vmConfigs = mapAttrsToList mkVMConf vboxVMs;
|
||||||
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
|
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
|
||||||
virtualisation.memorySize = 768;
|
virtualisation.memorySize = 768;
|
||||||
services.virtualboxHost.enable = true;
|
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 = ''
|
testScript = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user