blob: 51bf68b7a7daf2f44133cfb74eec53260d96cece (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# This file is inspired by the `nixos/modules/misc/ids.nix`
# file in nixpkgs.
{
lib,
config,
...
}: {
options.vhack.constants = {
ids.uids = lib.mkOption {
internal = true;
description = ''
The user IDs used in the vhack.eu nixos config.
'';
type = lib.types.attrsOf (lib.types.ints.between 0 400);
};
ids.gids = lib.mkOption {
internal = true;
description = ''
The group IDs used in the vhack.eu nixos config.
'';
type = lib.types.attrsOf (lib.types.ints.between 0 400);
};
};
config.vhack.constants = {
ids.uids = {
# Keep this sorted with `!sort --numeric-sort --key=2 --field-separator="="`
systemd-coredump = 151; # GROUP
opendkim = 221;
mautrix-whatsapp = 222;
etebase-server = 223;
matrix-synapse = 224;
rspamd = 225;
knot-resolver = 226;
peertube = 231;
redis-mastodon = 232;
redis-peertube = 233;
redis-rspamd = 234;
redis-stalwart-mail = 235;
mastodon = 236;
stalwart-mail = 238;
acme = 328;
dhcpcd = 329;
nscd = 330;
sshd = 331;
systemd-oom = 332;
resolvconf = 333; # GROUP
nix-sync = 334;
nextcloud = 335;
redis-nextcloud = 336;
taskchampion = 337;
stalwart-mail-certificates = 338; # GROUP
sharkey = 339;
redis-sharkey = 340;
grocy = 341;
anubis = 342;
postfix-tlspol = 343;
rocie = 344;
fluent-bit = 345;
loki = 346;
grafana = 347;
node-exporter = 348;
smartctl-exporter-access = 349;
fail2ban = 350;
wpa_supplicant = 351;
mandb = 352;
rtkit = 353;
nm-iodine = 354;
fwupd-refresh = 355;
avahi = 356;
adbusers = 357;
lpadmin = 358;
msr = 359;
polkituser = 360;
# As per the NixOS file, the uids should not be greater or equal to 400;
};
ids.gids = let
inherit (config.vhack.constants.ids) uids;
in {
# Please add your groups to the users and inherit them here.
# This avoids having an user/group id mismatch.
inherit
(uids)
acme
adbusers
anubis
avahi
dhcpcd
etebase-server
fail2ban
fluent-bit
fwupd-refresh
grafana
grocy
knot-resolver
loki
lpadmin
mandb
mastodon
matrix-synapse
mautrix-whatsapp
msr
nextcloud
nix-sync
node-exporter
nscd
opendkim
peertube
polkituser
postfix-tlspol
redis-mastodon
redis-nextcloud
redis-peertube
redis-rspamd
redis-sharkey
redis-stalwart-mail
resolvconf # This group is not matched to an user?
rocie
rspamd
rtkit
sharkey
smartctl-exporter-access
sshd
stalwart-mail
stalwart-mail-certificates # This group is used to connect nginx and stalwart-mail
systemd-coredump # matches systemd-coredump user
systemd-oom
wpa_supplicant
;
# The gid should match the uid. Thus should not be >= 400;
};
};
}
|