infra/secrets.nix

25 lines
769 B
Nix
Raw Normal View History

2024-06-24 16:03:07 +00:00
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 ];
mimir-environment = [ machines.meta01 ];
grafana-oauth-secret = [ machines.meta01 ];
2024-07-05 14:20:22 +00:00
loki-environment = [ machines.meta01 ];
# These are the same password, but nginx wants it in htpasswd format
metrics-push-htpasswd = [ machines.meta01 ];
metrics-push-password = builtins.attrValues machines;
2024-06-24 16:03:07 +00:00
};
in
builtins.listToAttrs (
map (secretName: {
name = "secrets/${secretName}.age";
value.publicKeys = secrets."${secretName}" ++ commonKeys;
}) (builtins.attrNames secrets)
)