2 { pkgs, lib, config, ... }:
3 let inherit (config) networking;
4 inherit (config.services) nginx;
5 srv = "lemoutona5pattes";
9 virtualHosts."${srv}" = {
10 serverName = "${srv}.${domain}";
13 root = "/home/julm/www/${srv}";
15 access_log ${nginx.logDir}/${domain}/${srv}/access.log json buffer=32k;
16 error_log ${nginx.logDir}/${domain}/${srv}/error.log warn;
18 locations."/".extraConfig = ''
21 fancyindex_name_length 255;
22 fancyindex_exact_size off;
26 systemd.services.nginx.preStart = lib.mkBefore ''
27 install -D -d -m 750 -o ${nginx.user} -g ${nginx.group} ${nginx.logDir}/${domain}/${srv}/