From 4d6791ee9be9fb3c33969fcc16403d3ef196996f Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Wed, 5 Feb 2025 20:43:42 +0100 Subject: [PATCH] Add unmanaged hosts --- hosts/bastion.nix | 17 +++++++++++++++++ hosts/home-assistant.nix | 3 +-- hosts/nix-test.nix | 5 ++++- hosts/pds.nix | 19 +++++++++++++++++++ hosts/wings1.nix | 17 +++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 hosts/bastion.nix create mode 100644 hosts/pds.nix create mode 100644 hosts/wings1.nix diff --git a/hosts/bastion.nix b/hosts/bastion.nix new file mode 100644 index 0000000..6c69d86 --- /dev/null +++ b/hosts/bastion.nix @@ -0,0 +1,17 @@ +{ + hlConfig, + ... +}: +rec { + hostname = "bastion"; + managed = false; + ip = "192.168.10.189"; + + traefikRoutes = [ + { + name = "${hostname}-vpn"; + rule = "Host(`vpn.${hlConfig.domain}`)"; + target = "http://${ip}:80"; + } + ]; +} diff --git a/hosts/home-assistant.nix b/hosts/home-assistant.nix index 5632f1c..56127fc 100644 --- a/hosts/home-assistant.nix +++ b/hosts/home-assistant.nix @@ -5,7 +5,7 @@ rec { hostname = "homeassistant"; managed = false; - ip = "192.168.10.98"; + ip = "192.168.10.192"; traefikRoutes = [ { @@ -14,5 +14,4 @@ rec { target = "http://${ip}:8123"; } ]; - } diff --git a/hosts/nix-test.nix b/hosts/nix-test.nix index ef4efd7..8feee09 100644 --- a/hosts/nix-test.nix +++ b/hosts/nix-test.nix @@ -13,7 +13,10 @@ ]; config = { sonarr.domain = "service1.${hlConfig.domain}"; - traefik.wildcardDomains = [ hlConfig.domain ]; + traefik.wildcardDomains = [ + hlConfig.domain + "pds.${hlConfig.domain}" + ]; }; stateVersion = "24.05"; } diff --git a/hosts/pds.nix b/hosts/pds.nix new file mode 100644 index 0000000..68ee9ff --- /dev/null +++ b/hosts/pds.nix @@ -0,0 +1,19 @@ +{ + hlConfig, + ... +}: +rec { + hostname = "pds"; + managed = false; + ip = "192.168.10.174"; + + traefikRoutes = [ + { + name = "${hostname}"; + rule = "Host(`${hlConfig.domain}`) || HostRegexp(`.+${ + builtins.replaceStrings [ "." ] [ "\\." ] hlConfig.domain + }`)"; + target = "http://${ip}:3000"; + } + ]; +} diff --git a/hosts/wings1.nix b/hosts/wings1.nix new file mode 100644 index 0000000..1073c39 --- /dev/null +++ b/hosts/wings1.nix @@ -0,0 +1,17 @@ +{ + hlConfig, + ... +}: +rec { + hostname = "wings1"; + managed = false; + ip = "192.168.10.190"; + + traefikRoutes = [ + { + name = "${hostname}"; + rule = "Host(`wings1.${hlConfig.shortDomain}`)"; + target = "http://${ip}:443"; + } + ]; +}