{ config, pkgs, ... }: { services.vsftpd = { enable = true; # Allow anonymous logins. anonymousUser = true; # Use 'anonymousUploadEnable' instead of 'anonUploadEnable'. # This allows anonymous users to upload files. anonymousUploadEnable = true; # CORRECT: Use 'anonymousUserHome' to set the root directory. # This should be the path to your NFS mount for scans. anonymousUserHome = "/mnt/service/data/paperless/consume"; # This option is available in your list. Set to false for better security anonymousMkdirEnable = false; # For any setting not in the NixOS option list, use extraConfig. extraConfig = '' # Log all transfers. xferlog_enable=YES # Allow the anonymous root to be writable. allow_writeable_chroot=YES write_enable=YES ''; }; # Ensure the user who will own the uploaded files exists. users.users.some-user = { isSystemUser = true; group = "users"; }; }