{ config, lib, pkgs, ... }: { users.groups.download.members = [ "transmission" ]; services.transmission = { enable = true; home = "/var/state/transmission"; group = "download"; downloadDirPermissions = "775"; settings = { download-dir = "/var/download/transmission"; incomplete-dir-enabled = false; rpc-bind-address = "::"; message-level = 1; umask = 18; rpc-whitelist-enabled = false; rpc-host-whitelist-enabled = false; }; }; security.acme.defaults.email = "spam@krebsco.de"; security.acme.acceptTerms = true; security.acme.certs."yellow.r".server = config.krebs.ssl.acmeURL; security.acme.certs."jelly.r".server = config.krebs.ssl.acmeURL; security.acme.certs."radar.r".server = config.krebs.ssl.acmeURL; security.acme.certs."sonar.r".server = config.krebs.ssl.acmeURL; security.acme.certs."transmission.r".server = config.krebs.ssl.acmeURL; services.nginx = { enable = true; package = pkgs.nginx.override { modules = with pkgs.nginxModules; [ fancyindex ]; }; virtualHosts."yellow.r" = { default = true; enableACME = true; addSSL = true; locations."/" = { root = "/var/download"; extraConfig = '' fancyindex on; fancyindex_footer "/fancy.html"; include ${pkgs.nginx}/conf/mime.types; include ${pkgs.writeText "extrMime" '' types { video/webm mkv; } ''}; create_full_put_path on; ''; }; locations."/chatty" = { proxyPass = "http://localhost:3000"; extraConfig = '' rewrite /chatty/(.*) /$1 break; proxy_set_header Host $host; ''; }; locations."= /fancy.html".extraConfig = '' alias ${pkgs.writeText "nginx_footer" ''