This is the result of ~100 commits to my NixOS config. Since I haven't always used `agenix-rekey`, this is another initial commit so that none of the secrets in my git history are leaked
27 lines
476 B
Nix
27 lines
476 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
keys = [
|
|
"id_ethnuc"
|
|
"id_europium"
|
|
"id_github"
|
|
"id_hausgold"
|
|
"id_homeassistant"
|
|
"id_rhenium"
|
|
];
|
|
in with lib.attrsets; {
|
|
elements.secrets.needs = builtins.listToAttrs (
|
|
builtins.map
|
|
(key: lib.attrsets.nameValuePair key {
|
|
rekeyFile = "ssh/${key}.age";
|
|
path = "${config.home.homeDirectory}/.ssh/${key}";
|
|
|
|
symlink = false;
|
|
mode = "0600";
|
|
})
|
|
keys
|
|
);
|
|
}
|