pepe: configure vsftpd for scanner
This commit is contained in:
parent
6afee0705f
commit
87006e54c4
4 changed files with 30 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
./syncthing.nix
|
||||
./tinc.nix
|
||||
./wifi-access-point.nix
|
||||
./vsftpd.nix
|
||||
|
||||
];
|
||||
|
||||
|
|
23
configs/pepe/vsftpd.nix
Normal file
23
configs/pepe/vsftpd.nix
Normal 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; }];
|
||||
|
||||
}
|
|
@ -26,6 +26,7 @@
|
|||
./syncthing.nix
|
||||
./tinc.nix
|
||||
./on-failure.nix
|
||||
./hosts.nix
|
||||
|
||||
];
|
||||
|
||||
|
|
5
system/all/hosts.nix
Normal file
5
system/all/hosts.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
networking.extraHosts = ''
|
||||
192.168.0.24 scanner
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue