nix/config/Ftpd.nix

24 lines
513 B
Nix

{ config, lib, ... }:
let
cfg = config.module.ftpd;
in
{
config = lib.mkIf cfg.enable {
services.vsftpd = {
enable = true;
allowWriteableChroot = true;
anonymousMkdirEnable = true;
anonymousUmask = "000";
anonymousUploadEnable = true;
anonymousUser = true;
anonymousUserHome = cfg.storage;
anonymousUserNoPassword = true;
localUsers = false;
writeEnable = true;
extraConfig = ''
anon_other_write_enable=YES
'';
};
};
}