]> Git — Sourcephile - sourcephile-nix.git/blob - machines/mermet/nginx/sourcephile.fr/whoami.nix
murmur: add mumble server on mermet
[sourcephile-nix.git] / machines / mermet / nginx / sourcephile.fr / whoami.nix
1 { domain, ... }:
2 { pkgs, lib, config, ... }:
3 let inherit (config) networking;
4 inherit (config.services) nginx;
5 srv = "whoami";
6 in
7 {
8 services.nginx = {
9 virtualHosts."${srv}" = {
10 serverName = "${srv}.${domain}";
11 forceSSL = true;
12 useACMEHost = domain;
13 root = "/var/empty";
14 extraConfig = ''
15 access_log off;
16 error_log /var/log/nginx/${domain}/${srv}/error.log warn;
17 keepalive_requests 0;
18 default_type text/plain;
19 '';
20 locations."/addr".return = "200 $remote_addr\\n";
21 };
22 };
23 systemd.services.nginx.serviceConfig.LogsDirectory = lib.mkForce ["nginx/${domain}/${srv}"];
24 }