extraDomains = { "ftp.immae.eu" = null; };
};
- nixpkgs.overlays = [ (self: super: {
- pure-ftpd = self.callPackage ./pure-ftpd.nix {};
- }) ];
-
networking = {
firewall = {
allowedTCPPorts = [ 21 ];
install -m 0755 -o ftp -g ftp -d /var/lib/ftp
'';
- deployment.keys.pure-ftpd-ldap = {
+ mySecrets.keys = [{
+ dest = "pure-ftpd-ldap";
permissions = "0400";
user = "ftp";
group = "ftp";
# Compile dans pure-ftpd directement avec immaeFtpUid / immaeFtpGid
LDAPHomeDir immaeFtpDirectory
'';
- };
+ }];
systemd.services.pure-ftpd = let
configFile = pkgs.writeText "pure-ftpd.conf" ''
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
- LDAPConfigFile /run/keys/pure-ftpd-ldap
+ LDAPConfigFile /var/secrets/pure-ftpd-ldap
LimitRecursion 10000 8
AnonymousCanCreateDirs no
MaxLoad 4