summary refs log tree commit diff stats
path: root/secrets/secrets.nix
blob: 75c174d1eb200de9b4d7c5b06a8c7326b2d2822f (plain)
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
let
  users = {
    alan = [
      "age1se1qdx3wrvaxevk3g40ngqreqc9n4gl0rwcjdvnptz5vw96jjjuf2rv2wp8c5m" # mba age-plugin-se
    ];
  };

  machines = {
    linde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHdh3J7dEmh9G+CVmzFEC8/ont35ZXpCFcpLUO863vC";
    nanopi = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/KOwhb4pyuw4U8hnkPAbRNk6o41Fmvsa67cY6MHA9k";
  };

  secrets = with machines; {
    acme = [ linde nanopi ];

    binarycache = [ linde ];
    paperless = [ linde ];
    powerdns = [ linde ];
    dex = [ linde ];
    golink = [ linde ];

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