pepe: configure vsftpd for scanner

This commit is contained in:
Ingolf Wagner 2020-04-27 21:41:42 +02:00
parent 6afee0705f
commit 87006e54c4
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
4 changed files with 30 additions and 0 deletions

View file

@ -10,6 +10,7 @@
./syncthing.nix
./tinc.nix
./wifi-access-point.nix
./vsftpd.nix
];

23
configs/pepe/vsftpd.nix Normal file
View file

@ -0,0 +1,23 @@
{ lib, pkgs, config, ... }: {
services.vsftpd = {
enable = true;
userlist = [ "ftp-upload" ];
userlistEnable = true;
localUsers = true;
writeEnable = true;
};
users.users.ftp-upload = {
passwordFile = toString <secrets/ftp/password>;
isNormalUser = true;
};
networking.firewall.allowedTCPPorts = [
20 # ftp
21 # ftp
];
networking.firewall.allowedTCPPortRanges = [ {from = 1024 ; to = 65535; }];
}

View file

@ -26,6 +26,7 @@
./syncthing.nix
./tinc.nix
./on-failure.nix
./hosts.nix
];

5
system/all/hosts.nix Normal file
View file

@ -0,0 +1,5 @@
{
networking.extraHosts = ''
192.168.0.24 scanner
'';
}