1 { lib, config, hostName, ... }:
2 with (import ../networking/names-and-numbers.nix);
4 inherit (config.networking) domain;
5 root = "/var/lib/nginx";
9 virtualHosts."${hostName}.${domain}" = {
19 #useACMEHost = domain;
22 access_log /var/log/nginx/${domain}/${hostName}/access.json json buffer=32k;
23 error_log /var/log/nginx/${domain}/${hostName}/error.log warn;
25 locations."/".extraConfig = ''
29 locations."/perso" = {
30 #basicAuthFile = gnupg.secrets."nginx/perso/htpasswd".path;
34 fancyindex_exact_size off;
35 fancyindex_name_length 255;
37 #open_file_cache_valid 1s;
42 systemd.services.nginx = {
44 LogsDirectory = lib.mkForce [
45 "nginx/${domain}/${hostName}"
48 "-/mnt/off2/julm/backup/das1/julm/perso:${root}/perso"