ssh: refactor 2: electric boogaloo

This commit is contained in:
Zynh Ludwig 2024-07-28 15:05:27 -07:00
parent d5f96ae6e5
commit 602ef03b1b

View file

@ -7,7 +7,7 @@ let
ifSops = lib.mkIf sops;
keyPathIfSops = key: ifSops secrets.${key}.path;
keyPathIfSops = key: ifSops secrets.${"private_keys/" + key}.path;
in
{
options.snowhawk.ssh = {
@ -27,23 +27,23 @@ in
hostname = "git.zynh.me";
user = "git";
port = 2221;
identityFile = keyPathIfSops "private_keys/personal_git";
identityFile = keyPathIfSops "personal_git";
};
snowhawk = {
identityFile = keyPathIfSops "private_keys/snowhawk";
identityFile = keyPathIfSops "snowhawk";
};
msiserver = {
hostname = "scarlet.zynh.me";
user = "zynh";
identityFile = keyPathIfSops "private_keys/msiserver";
identityFile = keyPathIfSops "msiserver";
};
"msiserver.local" = lib.mkIf cfg.homeNetwork {
hostname = "msiserver";
user = "zynh";
identityFile = keyPathIfSops "private_keys/msiserver";
identityFile = keyPathIfSops "msiserver";
};
caveserver = {
identityFile = keyPathIfSops "private_keys/caveserver";
identityFile = keyPathIfSops "caveserver";
};
};
};