X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fftp.nix;h=e3c1f7041589c1d6f4320bf54758cfb0a5e3971f;hb=ab8f306d7c2c49b8116e1af7b355ed2384617ed9;hp=59cae595bfe1c359aa6e6e7ef36a3c4a142a1937;hpb=17f6eae9907a122d4472da727ae8b1ac1c40c027;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/ftp.nix b/modules/private/ftp.nix index 59cae59..e3c1f70 100644 --- a/modules/private/ftp.nix +++ b/modules/private/ftp.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let package = pkgs.pure-ftpd.override { ldapFtpId = "immaeFtp"; }; in @@ -14,7 +14,10 @@ in }; config = lib.mkIf config.services.pure-ftpd.enable { - security.acme.certs."ftp" = config.services.myCertificates.certConfig // { + services.duplyBackup.profiles.ftp = { + rootDir = "/var/lib/ftp"; + }; + security.acme.certs."ftp" = config.myServices.certificates.certConfig // { domain = "eldiron.immae.eu"; postRun = '' systemctl restart pure-ftpd.service @@ -52,17 +55,17 @@ in user = "ftp"; group = "ftp"; text = '' - LDAPServer ${myconfig.env.ftp.ldap.host} + LDAPServer ${config.myEnv.ftp.ldap.host} LDAPPort 389 LDAPUseTLS True - LDAPBaseDN ${myconfig.env.ftp.ldap.base} - LDAPBindDN ${myconfig.env.ftp.ldap.dn} - LDAPBindPW ${myconfig.env.ftp.ldap.password} + LDAPBaseDN ${config.myEnv.ftp.ldap.base} + LDAPBindDN ${config.myEnv.ftp.ldap.dn} + LDAPBindPW ${config.myEnv.ftp.ldap.password} LDAPDefaultUID 500 LDAPForceDefaultUID False LDAPDefaultGID 100 LDAPForceDefaultGID False - LDAPFilter ${myconfig.env.ftp.ldap.filter} + LDAPFilter ${config.myEnv.ftp.ldap.filter} LDAPAuthMethod BIND