nix/config/Ftpd.nix

27 lines
548 B
Nix
Raw Normal View History

{
2024-11-04 04:37:29 +03:00
config,
lib,
util,
...
}: let
cfg = config.module.ftpd;
2024-11-16 04:43:59 +03:00
in {
2024-11-04 04:37:29 +03:00
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 = util.trimTabs ''
anon_other_write_enable=YES
'';
};
};
}