FTP Config #27

Merged
rouven0 merged 4 commits from ftp into main 2023-03-31 15:36:06 +02:00
2 changed files with 21 additions and 19 deletions

View file

@ -14,23 +14,6 @@
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = {
birne = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/birne/configuration.nix
./modules/base.nix
./modules/autoupdate.nix
./modules/desktop.nix
./modules/printing.nix
./modules/wifi.nix
./modules/options.nix
{
fsr.enable_office_bloat = true;
}
];
};
sanddorn = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
@ -42,8 +25,6 @@
./hosts/sanddorn/configuration.nix
./modules/infoscreen.nix
./modules/base.nix
./modules/autoupdate.nix
./modules/wifi.nix
./modules/desktop.nix
./modules/options.nix
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"

21
modules/ftp.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
let
domain = "ftp.${config.fsr.domain}";
in
{
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
root = "/srv/ftp";
extraConfig = ''
autoindex on;
'';
locations."~/(klausuren|uebungen|skripte|abschlussarbeiten)".extraConfig = ''
allow 141.30.0.0/16;
allow 141.76.0.0/16;
allow 172.16.0.0/16;
deny all;
'';
};
}