about summary refs log tree commit diff
path: root/configuration/secrets/keys.nix
blob: fcc822758db18407c865262099f769444a46c6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
let
  credentials = import ../credentials.nix;

  # machines and their host key that are included in this configuration,
  # in this case, just one.
  machines = {
    specimen = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA+DSTXhSm/ev71JvGg1i8qaMiJng/b++3wAbaTCwenf";
  };

  # users that can sign secrets, with all of their keys.
  admins = builtins.mapAttrs (n: u: u.keys) credentials;
in
{
  inherit machines admins;

  allAdminKeys = with builtins; concatLists (attrValues admins);
  allMachineKeys = builtins.attrValues machines;
}