X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Feldiron.nix;h=5b70eb3dccc643d2f7edbea61c6c6c925b134e55;hb=31a38b9f53fdaf1bd1141bc6dbf777605dfed590;hp=ecc65cc3f0082b3af970f4df7658910078b21d88;hpb=5f5efa6fa5a5b7d299998be410a278a7ff396504;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index ecc65cc..5b70eb3 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix @@ -1,4 +1,4 @@ -{ environment ? ./environment.nix }: +{ privateFiles ? ./. }: { network = { description = "Immae's network"; @@ -9,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; + inherit privateFiles; + env = import "${privateFiles}/environment.nix"; ips = { main = "176.9.151.89"; production = "176.9.151.154"; @@ -24,9 +26,13 @@ ./modules/certificates.nix ./modules/gitolite ./modules/databases + ./modules/mpd ./modules/websites ./modules/mail ./modules/ftp + ./modules/pub + ./modules/task + ./modules/irc ]; services.myGitolite.enable = true; services.myDatabases.enable = true; @@ -34,7 +40,14 @@ services.myWebsites.integration.enable = true; services.myWebsites.tools.enable = true; services.pure-ftpd.enable = true; + services.irc.enable = true; + services.pub.enable = true; + services.myTasks.enable = true; + services.journald.extraConfig = '' + MaxLevelStore="warning" + MaxRetentionSec="1year" + ''; networking = { firewall = { enable = true; @@ -94,14 +107,18 @@ 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: + 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? }; }