2 { pkgs, lib, config, inputs, hostName, ... }:
4 inherit (config) networking;
5 inherit (config.services) nginx;
7 root = "/var/lib/nginx/${domain}";
10 systemd.services.nginx.serviceConfig = {
12 "/home/julm/work/perso:${root}/julm"
15 "nginx/${domain}/julm"
17 LogsDirectory = lib.mkForce [
18 "nginx/${domain}/${srv}"
20 LoadCredentialEncrypted = [
21 "${domain}.${srv}.julm.PC.htpasswd:${inputs.self}/hosts/${hostName}/nginx/${domain}/${srv}/julm/PC/htpasswd.cred"
25 virtualHosts."${domain}.${srv}" = {
26 serverAliases = [ domain ];
29 root = "${root}/${srv}";
31 access_log /var/log/nginx/${domain}/${srv}/access.log json buffer=32k;
32 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
34 locations."/".extraConfig = ''
37 fancyindex_name_length 255;
38 fancyindex_exact_size off;
40 locations."/julm/" = {
41 alias = "${root}/julm/";
46 locations."/julm/PC/" = {
47 alias = "${root}/julm/PC/";
48 basicAuthFile = "/run/credentials/nginx.service/${domain}.${srv}.julm.PC.htpasswd";
51 fancyindex_name_length 255;
52 fancyindex_exact_size off;