]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/mermet/nginx/sourcephile.fr/lemoutona5pattes.nix
nix: update input julm-nix
[sourcephile-nix.git] / hosts / mermet / nginx / sourcephile.fr / lemoutona5pattes.nix
1 { domain, ... }:
2 { lib, config, ... }:
3 let
4 inherit (config.services) nginx;
5 srv = "lemoutona5pattes";
6 in
7 {
8 systemd.services.nginx.serviceConfig = {
9 BindPaths = [ "/home/julm/work/sourcephile/${srv}:/www" ];
10 };
11 services.nginx = {
12 virtualHosts."${srv}.${domain}" = {
13 forceSSL = true;
14 useACMEHost = domain;
15 root = "/www";
16 extraConfig = ''
17 access_log /var/log/nginx/${domain}/${srv}/access.log json buffer=32k;
18 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
19 '';
20 locations."/".extraConfig = ''
21 #autoindex on;
22 fancyindex on;
23 fancyindex_name_length 255;
24 fancyindex_exact_size off;
25 '';
26 };
27 };
28 systemd.services.nginx.serviceConfig.LogsDirectory = lib.mkForce [ "nginx/${domain}/${srv}" ];
29 }