all repos — nixfiles @ 7fc398dded782164e47cc201405cf36570e5d8ff

System and user configuration, managed by nix and home-manager

secrets/secrets.nix (view raw)

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
let
  users = {
    alin = [
      "age1se1qwz9tsr7fq6m7rh3fj44fh6vcth53x9lcff9jeangg43v66vznxus3vp5mz" # marvin age-plugin-se
    ];
  };

  data = (import ../data);
  machines = builtins.mapAttrs (_: (builtins.getAttr "publicKey")) data.machines;

  secrets = with machines; {
    acme = [
      hasel
      r5
      ulme
    ];

    redis-website = [
      hasel
    ];

    caddy = [
      r5
      hasel
      ulme
    ];
    pocket-id = [
      hasel
    ];
    binarycache = [
      hasel
    ];
    paperless = [
      hasel
    ];
    powerdns = [
      hasel
    ];
    readeck = [
      hasel
    ];
    codeberg-runner = [
      hasel
    ];

    dyndns = [ r5 ];
    syncthing = [ r5 ];
  };
in
builtins.listToAttrs (
  map (secretName: {
    name = "${secretName}.age";
    value.publicKeys = secrets.${secretName} ++ users.alin;
  }) (builtins.attrNames secrets)
)