mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: init
This commit is contained in:
commit
96c6f790fc
804 changed files with 33411 additions and 0 deletions
33
modules/nixos/services/website/default.nix
Executable file
33
modules/nixos/services/website/default.nix
Executable file
|
@ -0,0 +1,33 @@
|
|||
{ flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services.instances)
|
||||
upRootNutrition
|
||||
web
|
||||
;
|
||||
service = upRootNutrition;
|
||||
host = web.domains.url3;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
caddy = {
|
||||
virtualHosts = {
|
||||
"${host}" = {
|
||||
extraConfig = ''
|
||||
root * ${service.paths.path0}
|
||||
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
|
||||
try_files {path} /index.html
|
||||
|
||||
tls ${service.ssl.cert} ${service.ssl.key}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${service.paths.path0} 755 caddy caddy -"
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue