mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-08 13:59:24 -06:00
34 lines
645 B
Nix
34 lines
645 B
Nix
|
|
{ flake, config, ... }:
|
||
|
|
let
|
||
|
|
inherit (flake.config.services.instances)
|
||
|
|
projectSite
|
||
|
|
;
|
||
|
|
service = projectSite;
|
||
|
|
host = flake.inputs.linkpage.secrets.domains.projectsite;
|
||
|
|
in
|
||
|
|
{
|
||
|
|
services = {
|
||
|
|
caddy = {
|
||
|
|
virtualHosts = {
|
||
|
|
"${host}" = {
|
||
|
|
extraConfig = ''
|
||
|
|
root * ${service.paths.path0}
|
||
|
|
|
||
|
|
file_server
|
||
|
|
|
||
|
|
encode gzip
|
||
|
|
|
||
|
|
try_files {path} /index.html
|
||
|
|
|
||
|
|
tls ${service.ssl.cert}/${host}/fullchain.pem ${service.ssl.key}/${host}/key.pem
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
systemd.tmpfiles.rules = [
|
||
|
|
"Z ${service.paths.path0} 755 caddy caddy -"
|
||
|
|
];
|
||
|
|
}
|