4 inherit (config.services) nginx;
6 root = "/var/lib/nginx/${domain}";
9 systemd.services.nginx.serviceConfig = {
11 "/home/julm/work/sourcephile/txt:${root}/${srv}"
14 "nginx/${domain}/${srv}"
16 LogsDirectory = lib.mkForce [
17 "nginx/${domain}/${srv}"
21 virtualHosts."${srv}.${domain}" = {
22 serverAliases = [ domain ];
25 root = "${root}/${srv}";
27 access_log /var/log/nginx/${domain}/${srv}/access.log json buffer=32k;
28 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
30 locations."/".extraConfig = ''
33 fancyindex_name_length 255;
34 fancyindex_exact_size off;
36 locations."/temp".extraConfig = ''
40 locations."/git".return = "302 https://git.${domain}/$request_uri";
41 locations."/versions".return = "302 https://git.${domain}/$request_uri";
42 locations."/codes_sources".return = "302 https://git.code.${domain}";
43 locations."/mails".return = "302 https://mails.${domain}/$request_uri";
44 locations."/listes".return = "302 https://mails.${domain}/$request_uri";