Merge pull request #27 from fsr/ftp
This commit is contained in:
commit
a6ece02b03
19
flake.nix
19
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"
|
||||
|
|
21
modules/ftp.nix
Normal file
21
modules/ftp.nix
Normal 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;
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue