From 214c0d525d2c414508b6581daa6a14282af1d347 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Fri, 24 Mar 2023 17:05:30 +0100 Subject: [PATCH 1/4] basic ftp config --- modules/ftp.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/ftp.nix diff --git a/modules/ftp.nix b/modules/ftp.nix new file mode 100644 index 0000000..a3d6908 --- /dev/null +++ b/modules/ftp.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: +let + domain = "ftp.rfive.de"; +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; + ''; + + }; +} -- 2.44.2 From 250ee8b01b29c194cb429ddfbee35e60fe12b8ca Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Fri, 24 Mar 2023 17:06:40 +0100 Subject: [PATCH 2/4] formatting --- modules/ftp.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ftp.nix b/modules/ftp.nix index a3d6908..572c50b 100644 --- a/modules/ftp.nix +++ b/modules/ftp.nix @@ -11,10 +11,10 @@ in 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; + allow 141.30.0.0/16; + allow 141.76.0.0/16; + allow 172.16.0.0/16; + deny all; ''; }; -- 2.44.2 From 7c947ab23a2cceafde057805caaaa0df0ddce6c0 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sun, 26 Mar 2023 15:12:54 +0200 Subject: [PATCH 3/4] fix the domain name --- modules/ftp.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ftp.nix b/modules/ftp.nix index 572c50b..39c419b 100644 --- a/modules/ftp.nix +++ b/modules/ftp.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: let - domain = "ftp.rfive.de"; + domain = "ftp.${config.fsr.domain}"; in { services.nginx.virtualHosts."${domain}" = { -- 2.44.2 From a815de8429764d02be210fd1a7916ab0e930b174 Mon Sep 17 00:00:00 2001 From: revol-xut Date: Fri, 31 Mar 2023 15:00:32 +0200 Subject: [PATCH 4/4] fixing nix flake check --- flake.nix | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/flake.nix b/flake.nix index eeed680..7b5ad3d 100755 --- a/flake.nix +++ b/flake.nix @@ -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" -- 2.44.2