about summary refs log tree commit diff stats
path: root/modules/by-name/co/constants/module.nix
blob: 4f241b628fa0ff7642fbced8addb9f6e064f7ebf (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
# This file is inspired by the `nixos/modules/misc/ids.nix`
# file in nixpkgs.
{lib, ...}: {
  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.int;
    };
    ids.gids = lib.mkOption {
      internal = true;
      description = ''
        The group IDs used in the vhack.eu nixos config.
      '';
      type = lib.types.attrsOf lib.types.int;
    };
  };

  config.vhack.constants = {
    ids.uids = {
      acme = 328;
      dhcpcd = 329;
      nscd = 330;
      sshd = 331;
      systemd-oom = 332;
      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;

      # As per the NixOS file, the uids should not be greater or equal to 400;
    };
    ids.gids = {
      acme = 328;
      dhcpcd = 329;
      nscd = 330;
      sshd = 331;
      systemd-oom = 332;
      resolvconf = 333; # This group is not matched to an user?
      systemd-coredump = 151; # matches systemd-coredump user
      redis-peertube = 990;
      peertube = 992;
      mastodon = 996;
      redis-mastodon = 991;
      matrix-synapse = 224;
      knot-resolver = 997;
      redis-rspamd = 989;
      rspamd = 225;
      opendkim = 221;
      virtualMail = 5000;

      # The gid should match the uid. Thus should not be >= 400;
    };
  };
}