Skip to content

Commit 7bb2fea

Browse files
committed
add users nixbld1-32, fixes #4
hello, this is yolomcswaggins. i only test in ci
1 parent df4651d commit 7bb2fea

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

environments/modules/users.nix

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,25 @@
22

33
{
44
pkgs,
5+
lib,
56
...
67
}:
78
{
9+
imports = [
10+
{
11+
# Add nixbld users
12+
users.users = lib.pipe (lib.range 1 32) [
13+
(map (i: {
14+
name = "nixbld${toString i}";
15+
value = {
16+
uid = 30000 + i;
17+
gid = 30000;
18+
};
19+
}))
20+
lib.listToAttrs
21+
];
22+
}
23+
];
824
config = {
925
users = {
1026
enable = true;
@@ -19,10 +35,12 @@
1935
};
2036
groups.nix.gid = 1000;
2137
groups.nixbld.gid = 30000;
22-
users.sshd = {
23-
uid = 993;
24-
gid = 992;
25-
comment = "SSH privilege separation user";
38+
users = {
39+
sshd = {
40+
uid = 993;
41+
gid = 992;
42+
comment = "SSH privilege separation user";
43+
};
2644
};
2745
groups.sshd.gid = 992;
2846
};

0 commit comments

Comments
 (0)