about summary refs log tree commit diff stats
path: root/modules/by-name/co/constants/module.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-29 15:22:17 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-29 15:22:17 +0100
commit086a3931a295d2ba4faa98bfe717784c26829bfb (patch)
treeb31156b8c1e7954638e1be59999a4b5a33b9ede6 /modules/by-name/co/constants/module.nix
parentmodules/constants: Dry gid definitions by inheriting the uids (diff)
downloadnixos-server-086a3931a295d2ba4faa98bfe717784c26829bfb.zip
modules/constants: Correctly assign each uid so that none is greater 400
The uid ranges from 400 upwards are reserved for things that allocate
them dynamic during runtime (like systemd). Our users would than get
clobbered, thus we avoid that range.

BREAKING CHANGE: Well, we'll need to change all uid of the files owned by the respective users.
Diffstat (limited to '')
-rw-r--r--modules/by-name/co/constants/module.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/modules/by-name/co/constants/module.nix b/modules/by-name/co/constants/module.nix
index 9919eb8..54e8d81 100644
--- a/modules/by-name/co/constants/module.nix
+++ b/modules/by-name/co/constants/module.nix
@@ -24,24 +24,25 @@
 
   config.vhack.constants = {
     ids.uids = {
+      # Keep this sorted with `!sort --numeric-sort --key=2 --field-separator="="`
+      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;
+      mastodon = 236;
+      virtualMail = 240;
       acme = 328;
       dhcpcd = 329;
       nscd = 330;
       sshd = 331;
       systemd-oom = 332;
       nix-sync = 334;
-      redis-peertube = 990;
-      peertube = 992; # TODO Sort correctly
-      mastodon = 996;
-      redis-mastodon = 991;
-      matrix-synapse = 224;
-      mautrix-whatsapp = 225;
-      knot-resolver = 997;
-      redis-rspamd = 989;
-      rspamd = 225;
-      opendkim = 221;
-      virtualMail = 5000;
-      etebase-server = 998;
 
       # As per the NixOS file, the uids should not be greater or equal to 400;
     };