.hive/modules/home/ssh.nix

30 lines
698 B
Nix

{
config,
...
}: let
sshKeys = name: {
"ssh/id_rsa_${name}.pub" = {
sopsFile = ../../secrets/jonas/ssh.yaml;
key = "keys/${name}/pub";
path = "${config.home.homeDirectory}/.ssh/id_rsa_${name}.pub";
};
"ssh/id_rsa_${name}" = {
sopsFile = ../../secrets/jonas/ssh.yaml;
key = "keys/${name}/priv";
path = "${config.home.homeDirectory}/.ssh/id_rsa_${name}";
};
};
in {
sops.secrets =
{
"ssh/config" = {
sopsFile = ../../secrets/jonas/ssh.yaml;
key = "config";
path = "${config.home.homeDirectory}/.ssh/config";
};
}
// (sshKeys "borg")
// (sshKeys "passgit")
// (sshKeys "ansible");
}