mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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 {
|
||||
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 = ''
|
||||
|
Loading…
Reference in New Issue
Block a user