X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Feldiron.nix;h=4726d08ef831bccec5ddb5cfe58e90339853c3c5;hb=596e62a678366c83ea8204316c45e91e1d90b0d8;hp=337ea2f376bfd8a5ae7172bc14d1ed82f2980adf;hpb=01f21083a897b86bf148f1d2bb9c8edca4d3786a;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 337ea2f..4726d08 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix @@ -1,3 +1,4 @@ +{ privateFiles ? ./. }: { network = { description = "Immae's network"; @@ -8,9 +9,11 @@ with mylibs; { _module.args = { - mylibs = import ../libs.nix; + mylibs = import ../libs.nix { nixpkgs = pkgs; }; + mypkgs = import ../default.nix; myconfig = { - env = import ./environment.nix; + inherit privateFiles; + env = import "${privateFiles}/environment.nix"; ips = { main = "176.9.151.89"; production = "176.9.151.154"; @@ -23,14 +26,26 @@ ./modules/certificates.nix ./modules/gitolite ./modules/databases + ./modules/mpd ./modules/websites + ./modules/mail + ./modules/ftp + ./modules/pub + ./modules/task ]; 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; + services.pub.enable = true; + services.myTasks.enable = true; + services.journald.extraConfig = '' + MaxLevelStore="warning" + MaxRetentionSec="1year" + ''; networking = { firewall = { enable = true; @@ -88,5 +103,20 @@ source = ldap_authorized_keys; }; + services.cron = { + enable = true; + 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: > /dev/null + '' + ]; + }; + + # This value determines the NixOS release with which your system is + # to be compatible, in order to avoid breaking some software such as + # database servers. You should change this only after NixOS release + # notes say you should. + system.stateVersion = "18.09"; # Did you read the comment? }; }