feat(paperless): install ftp for scan-to-network

This commit is contained in:
Khaïs COLIN 2024-08-27 12:15:04 +02:00
parent bcaa1b97a2
commit 717fcffcf4
3 changed files with 23 additions and 1 deletions

View file

@ -8,6 +8,8 @@ in
./firewall.nix ./firewall.nix
./borgbackup.nix ./borgbackup.nix
./ftp.nix
(import ./acme.nix { inherit base-domain; }) (import ./acme.nix { inherit base-domain; })
(import ./nginx.nix { inherit base-domain; }) (import ./nginx.nix { inherit base-domain; })
./postgresql.nix ./postgresql.nix

View file

@ -1,7 +1,14 @@
{ {
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 80 443 ]; allowedTCPPorts = [ 22 80 443 21 ];
allowedUDPPorts = [ 22 80 443 ]; allowedUDPPorts = [ 22 80 443 ];
allowedTCPPortRanges = [
# vsftpd passive
{
from = 51000;
to = 51999;
}
];
}; };
} }

13
ftp.nix Normal file
View file

@ -0,0 +1,13 @@
{
services.vsftpd = {
enable = true;
localUsers = true;
writeEnable = true;
extraConfig = ''
log_ftp_protocol=YES
pasv_enable=YES
pasv_min_port=51000
pasv_max_port=51999
'';
};
}