From 039f0d6bd3e33dc926b39a7c13a457c7b99c3408 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Fri, 10 Nov 2023 13:53:46 +0100 Subject: [PATCH] [virtualbox] Add vb group to users --- nixos/modules/virtualisation/virtualbox/default.nix | 8 ++++++-- nixos/users/default.nix | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) 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"; + }; }