mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
33 lines
645 B
Nix
Executable file
33 lines
645 B
Nix
Executable file
{ 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 -"
|
|
];
|
|
}
|