feat: home-assistant + tewi

This commit is contained in:
Kat Inskip 2022-09-16 23:23:58 -07:00
parent 57e48cd9a8
commit ec7571171b
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
15 changed files with 322 additions and 113 deletions

View file

@ -5,7 +5,6 @@
cname = { inherit (config.network.addresses.public) target; };
};
deploy.tf.dns.records.services_cloud = {
inherit (config.network.dns) zone;
domain = "cloud";
@ -18,6 +17,12 @@
cname = { inherit (config.network.addresses.public) target; };
};
deploy.tf.dns.records.gensokyo_home = {
zone = "gensokyo.zone.";
domain = "home";
cname = { inherit (config.network.addresses.public) target; };
};
deploy.tf.dns.records.gensokyo_root_v4 = {
zone = "gensokyo.zone.";
a = { inherit (config.network.addresses.public.tf.ipv4) address; };
@ -37,6 +42,20 @@
root = pkgs.gensokyoZone;
};
};
"home.gensokyo.zone" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://${meta.tailnet.tewi.addresses.ipv4}:8123";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
'';
};
};
};
"home.${config.network.dns.domain}" = {
forceSSL = true;
enableACME = true;