feat: added new site stuff

This commit is contained in:
Nick 2024-12-08 22:53:40 -06:00
parent 0fd351c9cb
commit ff826c785a
7 changed files with 61 additions and 2 deletions

View file

@ -8,6 +8,7 @@
inherit (flake.config.services) instances;
domain0 = instances.web.domains.url0;
domain1 = instances.web.domains.url1;
domain3 = instances.web.domains.url3;
dns = instances.web.dns.provider0;
instanceName = service: (instances.${service}.subdomain);
dnsConfig = {
@ -53,6 +54,7 @@ in {
[
domain0
domain1
domain3
])
);
};

View file

@ -0,0 +1,28 @@
{
flake,
config,
...
}: let
inherit (flake.config.machines.devices) server;
inherit (flake.config.services.instances) upRootNutrition web;
service = upRootNutrition;
localhost = web.localhost.address0;
host = web.domains.url3;
in {
services = {
caddy = {
virtualHosts = {
"${host}" = {
extraConfig = ''
redir /.well-known/carddav /remote.php/dav/ 301
redir /.well-known/caldav /remote.php/dav/ 301
reverse_proxy ${localhost}:${toString service.ports.port1}
tls ${service.ssl.cert} ${service.ssl.key}
'';
};
};
};
};
}