2023-09-18 03:56:58 +01:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkMerge;
|
|
|
|
inherit (lib.lists) forEach;
|
|
|
|
inherit (builtins) attrNames;
|
|
|
|
|
2023-09-21 05:06:27 +01:00
|
|
|
containerAddresses = import "${self}/hosts/hetzner-arm/data/containerAddresses.nix";
|
2023-08-01 20:53:25 +01:00
|
|
|
in {
|
2021-12-29 12:26:15 +00:00
|
|
|
programs.ssh.enable = true;
|
2022-12-04 13:45:43 +00:00
|
|
|
programs.ssh.matchBlocks =
|
2023-09-18 03:56:58 +01:00
|
|
|
mkMerge
|
2023-09-21 05:06:27 +01:00
|
|
|
((forEach ["hetzner-arm" "hetzner-arm-decrypt" "vault" "vault-decrypt" "raspberry"] (hostname: {
|
2022-12-20 12:28:00 +00:00
|
|
|
"${hostname}" = {
|
|
|
|
user = "root";
|
|
|
|
hostname = "${hostname}.servers.genderfucked.monster";
|
|
|
|
};
|
|
|
|
}))
|
2023-09-18 03:56:58 +01:00
|
|
|
++ (forEach (attrNames containerAddresses.containers) (name: {
|
2023-09-21 05:06:27 +01:00
|
|
|
"hetzner-arm-container-${name}" = {
|
2023-08-01 20:53:25 +01:00
|
|
|
user = "root";
|
2023-09-18 03:56:58 +01:00
|
|
|
hostname = "${containerAddresses.containers.${name}}";
|
2023-09-21 05:06:27 +01:00
|
|
|
proxyJump = "hetzner-arm";
|
2023-08-01 20:53:25 +01:00
|
|
|
};
|
|
|
|
}))
|
2022-12-20 12:28:00 +00:00
|
|
|
++ [
|
|
|
|
{
|
|
|
|
"blahaj" = {
|
|
|
|
user = "chaos";
|
|
|
|
hostname = "blahaj.sapphicco.de";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
]);
|
2021-12-29 12:26:15 +00:00
|
|
|
}
|