]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - flakes/myuids/flake.nix
Add monitoring script with smartctl
[perso/Immae/Config/Nix.git] / flakes / myuids / flake.nix
CommitLineData
1be9e64b
IB
1{
2 description = "Immae Specific uids";
3
4 outputs = { self }: {
5 lib = {
6 # Check that there is no clash with nixos/modules/misc/ids.nix
7 uids = {
8c91e92c 8 cryptpad = 386;
1a64deeb 9 openldap = 99; # commented in the ids file
31d99b75 10 postfixscripts = 387;
1be9e64b
IB
11 acme = 388;
12 backup = 389;
13 vhost = 390;
14 openarc = 391;
15 opendmarc = 392;
16 peertube = 394;
17 redis = 395;
18 nullmailer = 396;
19 mediagoblin = 397;
20 diaspora = 398;
21 mastodon = 399;
22 };
23 gids = {
24 nagios = 11; # commented in the ids file
1a64deeb 25 openldap = 99; # commented in the ids file
8c91e92c 26 cryptpad = 386;
1be9e64b
IB
27 acme = 388;
28 backup = 389;
29 vhost = 390;
30 openarc = 391;
31 opendmarc = 392;
32 peertube = 394;
33 redis = 395;
34 nullmailer = 396;
35 mediagoblin = 397;
36 diaspora = 398;
37 mastodon = 399;
38 };
39 };
1a64deeb 40 nixosModule = { config, lib, ... }: {
1be9e64b
IB
41 config = {
42 ids.uids = self.lib.uids;
43 ids.gids = self.lib.gids;
1a64deeb
IB
44 assertions = [
45 {
46 assertion = builtins.length (builtins.attrValues config.ids.gids) == builtins.length (lib.unique (builtins.attrValues config.ids.gids));
47 message = "Non-unique list of gids";
48 }
49 {
50 assertion = builtins.length (builtins.attrValues config.ids.uids) == builtins.length (lib.unique (builtins.attrValues config.ids.uids));
51 message = "Non-unique list of uids";
52 }
53 ];
1be9e64b
IB
54 };
55 };
56 };
57}