fra1-b: use spipe with shorthand

This commit is contained in:
Motiejus Jakštys 2024-09-30 22:26:54 +03:00
parent 78545ebab4
commit 00f806f63a
3 changed files with 16 additions and 11 deletions

View File

@ -159,13 +159,6 @@ in
saslPasswdPath = config.age.secrets.sasl-passwd.path;
};
#syncthing = {
# enable = true;
# dataDir = "/home/motiejus/";
# user = "motiejus";
# group = "users";
#};
};
};

View File

@ -27,11 +27,19 @@
''
Host git.jakstys.lt
HostName ${myData.hosts."fwminex.servers.jakst".jakstIP}
''
+ (lib.concatMapStringsSep "\n" (host: ''
+ (lib.concatMapStringsSep "\n"
(host: ''
Host ${builtins.elemAt (lib.splitString "." host) 0}
HostName ${myData.hosts.${host}.jakstIP}
'') (builtins.attrNames (lib.filterAttrs (_: props: props ? jakstIP) myData.hosts)));
'')
(
builtins.attrNames (
lib.filterAttrs (name: props: name != "fra1-b.servers.jakst" && props ? jakstIP) myData.hosts
)
)
);
};
};
}

View File

@ -30,6 +30,10 @@
programs.ssh.extraConfig = ''
Host fra1-b.jakstys.lt jakstys.lt
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
Host fra1-b
HostName fra1-b.jakstys.lt
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${cfg.keyfile}
'';
}
)