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/photo" = {
30 #basicAuthFile = gnupg.secrets."nginx/perso/htpasswd".path;
34 #fancyindex_exact_size off;
35 #fancyindex_name_length 255;
37 #open_file_cache_valid 1s;
40 locations."/perso/camera" = {
41 #basicAuthFile = gnupg.secrets."nginx/perso/htpasswd".path;
45 #fancyindex_exact_size off;
46 #fancyindex_name_length 255;
48 #open_file_cache_valid 1s;
53 systemd.services.nginx = {
55 LogsDirectory = lib.mkForce [
56 "nginx/${domain}/${hostName}"
59 "-/mnt/off2/julm/backup/das1/julm/perso/photo:${root}/perso/photo"
60 "-/mnt/off2/julm/perso/camera:${root}/perso/camera"