ssh: use ssh dir instead of homedir
This commit is contained in:
parent
afdd0a22f3
commit
6bb530e404
1 changed files with 10 additions and 9 deletions
|
@ -12,7 +12,7 @@ in
|
|||
};
|
||||
|
||||
config =
|
||||
let home = config.home.homeDirectory + "/.ssh";
|
||||
let sshDir = config.home.homeDirectory + "/.ssh";
|
||||
in lib.mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
@ -22,28 +22,29 @@ in
|
|||
hostname = "git.zynh.me";
|
||||
user = "git";
|
||||
port = 2221;
|
||||
identityFile = "${home}/.ssh/personal_git";
|
||||
identityFile = "${sshDir}/personal_git";
|
||||
};
|
||||
msiserver = {
|
||||
hostname = "scarlet.zynh.me";
|
||||
user = "zynh";
|
||||
identityFile = "${home}/.ssh/msiserver";
|
||||
identityFile = "${sshDir}/msiserver";
|
||||
};
|
||||
"msiserver.local" = lib.mkIf cfg.homeNetwork {
|
||||
hostname = "msiserver";
|
||||
user = "zynh";
|
||||
identityFile = "${home}/.ssh/msiserver";
|
||||
identityFile = "${sshDir}/msiserver";
|
||||
};
|
||||
caveserver = {
|
||||
identityFile = "${home}/.ssh/caveserver";
|
||||
identityFile = "${sshDir}/caveserver";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets = lib.mkIf sops {
|
||||
"private_keys/msiserver".path = "${home}/.ssh/msiserver";
|
||||
"private_keys/caveserver".path = "${home}/.ssh/caveserver";
|
||||
"ssh_hosts/caveserver".path = "${home}/.ssh/conf.d/caveserver_config";
|
||||
sops.secrets = ifSops {
|
||||
"private_keys/msiserver" = { };
|
||||
"private_keys/caveserver" = { };
|
||||
|
||||
"ssh_hosts/caveserver".path = "${sshDir}/conf.d/caveserver_config";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue