ssh: use keyfiles directly, also only include if sops is enabled

sh-initrd-on-root
Zynh Ludwig 2024-07-28 06:32:16 -07:00
parent 6bb530e404
commit a0befb35e7
1 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,9 @@
let
cfg = config.snowhawk.ssh;
sops = config.snowhawk.sops.enable;
secrets = config.sops.secrets;
ifSops = lib.mkIf sops;
in
{
options.snowhawk.ssh = {
@ -22,20 +25,20 @@ in
hostname = "git.zynh.me";
user = "git";
port = 2221;
identityFile = "${sshDir}/personal_git";
identityFile = ifSops secrets."private_keys/personal_git".path;
};
msiserver = {
hostname = "scarlet.zynh.me";
user = "zynh";
identityFile = "${sshDir}/msiserver";
identityFile = ifSops secrets."private_keys/msiserver".path;
};
"msiserver.local" = lib.mkIf cfg.homeNetwork {
hostname = "msiserver";
user = "zynh";
identityFile = "${sshDir}/msiserver";
identityFile = ifSops secrets."private_keys/msiserver".path;
};
caveserver = {
identityFile = "${sshDir}/caveserver";
identityFile = ifSops secrets."private_keys/caveserver".path;
};
};
};