2024-12-19 22:37:17 -06:00
|
|
|
{flake, ...}: let
|
2024-12-08 22:53:40 -06:00
|
|
|
inherit (flake.config.services.instances) upRootNutrition web;
|
|
|
|
service = upRootNutrition;
|
2024-12-20 01:18:28 -06:00
|
|
|
# localhost = web.localhost.address0;
|
2024-12-08 22:53:40 -06:00
|
|
|
host = web.domains.url3;
|
|
|
|
in {
|
|
|
|
services = {
|
|
|
|
caddy = {
|
|
|
|
virtualHosts = {
|
|
|
|
"${host}" = {
|
|
|
|
extraConfig = ''
|
2024-12-20 01:18:28 -06:00
|
|
|
root * ${service.path.path0}
|
2024-12-20 00:29:03 -06:00
|
|
|
|
2024-12-20 01:18:28 -06:00
|
|
|
file_server
|
2024-12-20 00:53:48 -06:00
|
|
|
|
2024-12-20 01:18:28 -06:00
|
|
|
encode gzip
|
2024-12-08 22:53:40 -06:00
|
|
|
|
2024-12-20 01:18:28 -06:00
|
|
|
try_files {path} /index.html
|
2024-12-08 22:53:40 -06:00
|
|
|
|
2024-12-19 22:37:17 -06:00
|
|
|
tls ${service.ssl.cert} ${service.ssl.key}
|
2024-12-08 22:53:40 -06:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-12-20 01:18:28 -06:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"Z ${service.paths.path0} 755 caddy caddy -"
|
|
|
|
];
|
2024-12-08 22:53:40 -06:00
|
|
|
}
|