infra/secrets.nix
raito f0647702d4 hotfix: hot bagel on secrets (netbox)
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-07-04 13:51:25 +02:00

18 lines
451 B
Nix

let
keys = import common/ssh-keys.nix;
commonKeys = keys.users.delroth;
secrets = with keys; {
hydra-s3-credentials = [ machines.bagel-box ];
hydra-ssh-key-priv = [ machines.bagel-box ];
netbox-environment = [ machines.meta01 ];
};
in
builtins.listToAttrs (
map (secretName: {
name = "secrets/${secretName}.age";
value.publicKeys = secrets."${secretName}" ++ commonKeys;
}) (builtins.attrNames secrets)
)