re-organize home-modules

This commit is contained in:
2024-10-19 14:35:08 +02:00
parent f1d7b850fa
commit b95ebd8efc
52 changed files with 36 additions and 30 deletions

29
modules/home/ssh.nix Normal file
View File

@@ -0,0 +1,29 @@
{
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");
}