2 { pkgs, lib, config, ... }:
4 inherit (config) networking;
5 inherit (config.security) gnupg;
6 inherit (config.services) nginx;
8 root = "/var/lib/nginx/${domain}";
11 systemd.services.nginx.serviceConfig = {
13 "/home/julm/work/sourcephile/txt:${root}/${srv}"
16 "nginx/${domain}/${srv}"
18 LogsDirectory = lib.mkForce [
19 "nginx/${domain}/${srv}"
23 virtualHosts."${srv}.${domain}" = {
24 serverAliases = [ domain ];
27 root = "${root}/${srv}";
29 access_log /var/log/nginx/${domain}/${srv}/access.log json buffer=32k;
30 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
32 locations."/".extraConfig = ''
35 fancyindex_name_length 255;
36 fancyindex_exact_size off;
38 locations."/git".return = "302 https://git.${domain}/$request_uri";
39 locations."/versions".return = "302 https://git.${domain}/$request_uri";
40 locations."/codes_sources".return = "302 https://git.code.${domain}";
41 locations."/mails".return = "302 https://mails.${domain}/$request_uri";
42 locations."/listes".return = "302 https://mails.${domain}/$request_uri";