2 { lib, config, inputs, hostName, ... }:
4 inherit (config.services) nginx;
6 root = "/var/lib/nginx/${domain}";
9 systemd.services.nginx.serviceConfig = {
11 "/home/julm/work/perso:${root}/julm"
14 "nginx/${domain}/julm"
16 LogsDirectory = lib.mkForce [
17 "nginx/${domain}/${srv}"
19 LoadCredentialEncrypted = [
20 "${domain}.${srv}.julm.PC.htpasswd:${inputs.self}/hosts/${hostName}/nginx/${domain}/${srv}/julm/PC/htpasswd.cred"
24 virtualHosts."${domain}.${srv}" = {
25 serverAliases = [ domain ];
28 root = "${root}/${srv}";
30 access_log /var/log/nginx/${domain}/${srv}/access.log json buffer=32k;
31 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
33 locations."/".extraConfig = ''
36 fancyindex_name_length 255;
37 fancyindex_exact_size off;
39 locations."/julm/" = {
40 alias = "${root}/julm/";
45 locations."/julm/PC/" = {
46 alias = "${root}/julm/PC/";
47 basicAuthFile = "/run/credentials/nginx.service/${domain}.${srv}.julm.PC.htpasswd";
50 fancyindex_name_length 255;
51 fancyindex_exact_size off;