mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
29 lines
644 B
Nix
29 lines
644 B
Nix
![]() |
{
|
||
|
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}
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|