re-organize home-modules
This commit is contained in:
29
modules/home/ssh.nix
Normal file
29
modules/home/ssh.nix
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user