37 lines
942 B
Nix
37 lines
942 B
Nix
{
|
|
self,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkMerge;
|
|
inherit (lib.lists) forEach;
|
|
inherit (builtins) attrNames;
|
|
|
|
containerAddresses = import "${self}/hosts/hetzner-arm/data/containerAddresses.nix";
|
|
in {
|
|
programs.ssh.enable = true;
|
|
programs.ssh.matchBlocks =
|
|
mkMerge
|
|
((forEach ["hetzner-arm" "hetzner-arm-decrypt" "vault" "vault-decrypt" "raspberry"] (hostname: {
|
|
"${hostname}" = {
|
|
user = "root";
|
|
hostname = "${hostname}.servers.genderfucked.monster";
|
|
};
|
|
}))
|
|
++ (forEach (attrNames containerAddresses.containers) (name: {
|
|
"hetzner-arm-container-${name}" = {
|
|
user = "root";
|
|
hostname = "${containerAddresses.containers.${name}}";
|
|
proxyJump = "hetzner-arm";
|
|
};
|
|
}))
|
|
++ [
|
|
{
|
|
"blahaj" = {
|
|
user = "chaos";
|
|
hostname = "blahaj.sapphicco.de";
|
|
};
|
|
}
|
|
]);
|
|
}
|