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