X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Feldiron.nix;h=ecc65cc3f0082b3af970f4df7658910078b21d88;hb=5f5efa6fa5a5b7d299998be410a278a7ff396504;hp=7ce33a927f194985f9f3e0b2199d9e8baa63afcb;hpb=af421a8fcfa03744d9afa8c502250b6109585dd6;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 7ce33a9..ecc65cc 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix @@ -1,3 +1,4 @@ +{ environment ? ./environment.nix }: { network = { description = "Immae's network"; @@ -10,7 +11,7 @@ _module.args = { mylibs = import ../libs.nix; myconfig = { - env = import ./environment.nix; + env = import environment; ips = { main = "176.9.151.89"; production = "176.9.151.154"; @@ -25,12 +26,14 @@ ./modules/databases ./modules/websites ./modules/mail + ./modules/ftp ]; services.myGitolite.enable = true; services.myDatabases.enable = true; services.myWebsites.production.enable = true; services.myWebsites.integration.enable = true; services.myWebsites.tools.enable = true; + services.pure-ftpd.enable = true; networking = { firewall = { @@ -89,5 +92,16 @@ source = ldap_authorized_keys; }; + services.cron = { + enable = true; + # Doesn't work, need to be a user + mailto = "cron+eldiron@immae.eu"; + systemCronJobs = [ + '' + # The star after /var/lib/* avoids deleting all folders in case of problem + 0 3,9,15,21 * * * root rsync -e "ssh -i /root/.ssh/id_charon_vpn" -aAXvz --delete --numeric-ids --super --rsync-path="sudo rsync" /var/lib/* immae@immae.eu: + '' + ]; + }; }; }