mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
32 lines
581 B
Nix
Executable file
32 lines
581 B
Nix
Executable file
{ flake, pkgs, ... }:
|
|
let
|
|
inherit (flake.config.services.instances)
|
|
upRootNutrition
|
|
web
|
|
;
|
|
service = upRootNutrition;
|
|
host = web.domains.url1;
|
|
|
|
websitePkg = flake.inputs.upRootNutrition.packages.${pkgs.system}.websiteFrontend;
|
|
in
|
|
{
|
|
services = {
|
|
caddy = {
|
|
virtualHosts = {
|
|
"${host}" = {
|
|
extraConfig = ''
|
|
root * ${websitePkg}
|
|
|
|
file_server
|
|
|
|
encode gzip
|
|
|
|
try_files {path} /index.html
|
|
|
|
tls ${service.ssl.cert} ${service.ssl.key}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|