Skip to content

Commit 7eda4b8

Browse files
committed
add option to create extra user groups
1 parent ec31ec4 commit 7eda4b8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

modules/nixos/base/default.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ in {
3535
description = "Primary user for permissions and defaults.";
3636
};
3737

38+
extraGroups = mkOption {
39+
type = listOf str;
40+
default = [ "plugdev" ];
41+
description = "Extra groups to create.";
42+
};
43+
3844
tz = mkOption {
3945
type = str;
4046
default = "America/Vancouver";
@@ -106,6 +112,12 @@ in {
106112
(python3.withPackages py-pkgs)
107113
];
108114

115+
# extra groups
116+
users.groups = builtins.listToAttrs (map (name: {
117+
inherit name;
118+
value = { };
119+
}) cfg.extraGroups);
120+
109121
# sops
110122
sops = let
111123
isEd25519 = k: k.type == "ed25519";

0 commit comments

Comments
 (0)