fruitbasket/modules/ftp.nix
Rouven Seifert c360abe7d9
ftp: remove TUD private subnet
was added on kaki back then. Probably because of some routing misconfigurations
let's embrace some hope that this is now fixed
2023-10-18 23:30:16 +02:00

23 lines
513 B
Nix

{ config, pkgs, ... }:
let
domain = "ftp.${config.networking.domain}";
in
{
services.nginx.additionalModules = [ pkgs.nginxModules.fancyindex ];
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
root = "/srv/ftp";
extraConfig = ''
fancyindex on;
fancyindex_exact_size off;
'';
locations."~/(klausuren|uebungen|skripte|abschlussarbeiten)".extraConfig = ''
allow 141.30.0.0/16;
allow 141.76.0.0/16;
deny all;
'';
};
}