ssh: use keyfiles directly, also only include if sops is enabled
parent
6bb530e404
commit
a0befb35e7
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue