mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 10:35:13 -05:00
28 lines
644 B
Nix
Executable file
28 lines
644 B
Nix
Executable file
{
|
|
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}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|