From d6089d17913c9b8c20d73ea057e5e58be0846017 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Tue, 30 Jun 2026 11:16:54 +0200 Subject: [PATCH] add more options for user in mydesktop module --- modules/desktop/default.nix | 41 ++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index eae1eaa..e7ba52e 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -116,6 +116,31 @@ in { description = "SSH key used for git commit signing on this host."; }; + user = { + id = mkOption { + type = types.int; + default = 2000; + description = "User UID to set, default 2000"; + }; + groups = mkOption { + type = types.listOf types.str; + default = [ + "wheel" + "video" + "audio" + "camera" + "networkmanager" + "lp" + "kvm" + "libvirtd" + "adb" + "dialout" + "tss" + ]; + description = "Groups the user is in"; + }; + }; + extraSystemPackages = mkOption { type = types.listOf types.package; default = []; @@ -130,20 +155,8 @@ in { { users.users.${user} = { isNormalUser = true; - uid = 2000; - extraGroups = [ - "wheel" - "video" - "audio" - "camera" - "networkmanager" - "lp" - "kvm" - "libvirtd" - "adb" - "dialout" - "tss" - ]; + uid = cfg.user.id; + extraGroups = cfg.user.groups; }; security = {