diff --git a/nixos/modules/virtualisation/virtualbox/default.nix b/nixos/modules/virtualisation/virtualbox/default.nix index 5a01b66..a746493 100644 --- a/nixos/modules/virtualisation/virtualbox/default.nix +++ b/nixos/modules/virtualisation/virtualbox/default.nix @@ -28,8 +28,12 @@ in { x11 = true; }; }; - users.extraGroups.vboxusers.members = [ - "user-with-access-to-virtualbox" + + users.groups.vboxusers = {}; + + sisyphus.users.wantedGroups = [ + config.users.groups.vboxusers.name # The group we defined earlier + config.users.groups.dialout.name # Serial Port ]; }; } diff --git a/nixos/users/default.nix b/nixos/users/default.nix index a48b2c4..2c60be9 100644 --- a/nixos/users/default.nix +++ b/nixos/users/default.nix @@ -1,5 +1,14 @@ +{ config, lib, ... }: + { imports = [ ./tdpeuter ]; + + options.sisyphus.users.wantedGroups = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + example = [ config.users.groups.wheel.name ]; + description = "Groups to which a user should be added"; + }; }