nix-config/secrets.nix
2026-03-24 01:04:55 +01:00

25 lines
914 B
Nix

let
horseman = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpt0NisTZPYDdumMXhxaKv3JygSE0EKE6OiYw4A8ot7";
luna = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFu+XwTX1vF8Xqlna99Tu50TBT0cmOatb2LLwnC/33DU root@luna";
solis = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKepQ6sJahN0VQTMowIiga2WZBCaNBTadca+OxCV6T6 root@solis";
terra = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN6Mog8ujGXnEZ3lXm4zrYclh/0xx4LhZV2U5zqqxALE root@terra";
artemis = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHDZfBvo7QMA+V/Taxk+xU6jBDzVEz+1pJGmHkCE1rOH root@nixos";
systems = [luna artemis solis terra];
all = [horseman] ++ systems;
secrets = [
"wifi"
"ssh/id_personal"
"ssh/id_personal.pub"
"ssh/id_github"
"ssh/id_github.pub"
"ssh/config"
"containers/forgejo-secret"
"password"
];
attrs = map (secret: {"secrets/${secret}.age".publicKeys = all;}) secrets;
in
builtins.foldl' (acc: curr: acc // curr) {} attrs