This commit is contained in:
kat witch 2022-03-23 13:01:09 +00:00 committed by kat
parent e38bb2407d
commit bdf2fedcfe
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
3 changed files with 36 additions and 1 deletions

View file

@ -17,6 +17,12 @@
cname = { inherit (config.network.addresses.public) target; };
};
deploy.tf.dns.records.services_home = {
inherit (config.network.dns) zone;
domain = "home";
cname = { inherit (config.network.addresses.public) target; };
};
services.nginx.virtualHosts = mkMerge [
{
"cast.${config.network.dns.domain}" = {
@ -33,6 +39,19 @@
"/".proxyPass = "http://cloud.int.kittywit.ch:80/";
};
};
"home.${config.network.dns.domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = "http://home.int.kittywit.ch:80/";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
};
"media.${config.network.dns.domain}" = {
forceSSL = true;
enableACME = true;

View file

@ -17,5 +17,21 @@
];
};
deploy.tf.dns.records.services_internal_home = {
inherit (config.network.dns) zone;
domain = "home.int";
cname = { inherit (config.network.addresses.yggdrasil) target; };
};
services.nginx.virtualHosts."home.kittywit.ch" = {
locations."/" = {
proxyPass = "http://127.0.0.1:8123";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
network.firewall.public.tcp.ports = [ 8123 ];
}