]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Rename backup module to duply_backup
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 23 Oct 2019 22:35:49 +0000 (00:35 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 23 Oct 2019 22:35:49 +0000 (00:35 +0200)
36 files changed:
modules/default.nix
modules/duply_backup/default.nix [moved from modules/backup/default.nix with 91% similarity]
modules/private/buildbot/default.nix
modules/private/certificates.nix
modules/private/ftp.nix
modules/private/gitolite/default.nix
modules/private/irc.nix
modules/private/mail/default.nix
modules/private/mail/dovecot.nix
modules/private/mail/postfix.nix
modules/private/mail/rspamd.nix
modules/private/monitoring/default.nix
modules/private/mpd.nix
modules/private/pub/default.nix
modules/private/system.nix
modules/private/system/eldiron.nix
modules/private/tasks/default.nix
modules/private/websites/aten/integration.nix
modules/private/websites/aten/production.nix
modules/private/websites/chloe/integration.nix
modules/private/websites/chloe/production.nix
modules/private/websites/connexionswing/integration.nix
modules/private/websites/connexionswing/production.nix
modules/private/websites/default.nix
modules/private/websites/emilia/production.nix
modules/private/websites/florian/app.nix
modules/private/websites/ludivinecassal/integration.nix
modules/private/websites/ludivinecassal/production.nix
modules/private/websites/piedsjaloux/integration.nix
modules/private/websites/piedsjaloux/production.nix
modules/private/websites/tools/diaspora/default.nix
modules/private/websites/tools/ether/default.nix
modules/private/websites/tools/mail/default.nix
modules/private/websites/tools/mastodon/default.nix
modules/private/websites/tools/tools/default.nix
modules/webapps/webstats/default.nix

index 05f2bfe0e14ee193b31f60baf3cb1638debfa3c5..18bee9af14fa14504ff57b69a99b426fe975e256 100644 (file)
@@ -13,7 +13,7 @@
   opendmarc = ./opendmarc.nix;
   openarc = ./openarc.nix;
 
-  backup = ./backup;
+  duplyBackup = ./duply_backup;
   naemon = ./naemon;
 
   php-application = ./websites/php-application.nix;
similarity index 91%
rename from modules/backup/default.nix
rename to modules/duply_backup/default.nix
index be12231ec176a1b583f507fc54e85a4ab0b0e646..32fa9414324bac0117492e225a3bcd8c0a1c6fd2 100644 (file)
@@ -27,14 +27,14 @@ let
 in
 {
   options = {
-    services.backup.enable = lib.mkOption {
+    services.duplyBackup.enable = lib.mkOption {
       type = lib.types.bool;
       default = false;
       description = ''
         Whether to enable remote backups.
       '';
     };
-    services.backup.profiles = lib.mkOption {
+    services.duplyBackup.profiles = lib.mkOption {
       type = lib.types.attrsOf (lib.types.submodule {
         options = {
           rootDir = lib.mkOption {
@@ -55,7 +55,7 @@ in
     };
   };
 
-  config = lib.mkIf config.services.backup.enable {
+  config = lib.mkIf config.services.duplyBackup.enable {
     system.activationScripts.backup = ''
       install -m 0700 -o root -g root -d ${varDir} ${varDir}/caches
       '';
@@ -70,7 +70,7 @@ in
         dest = "backup/${k}/exclude";
         text = v.excludeFile;
       }
-    ]) config.services.backup.profiles);
+    ]) config.services.duplyBackup.profiles);
 
     services.cron = {
       enable = true;
@@ -83,7 +83,7 @@ in
               touch ${varDir}/${k}.log
               ${pkgs.duply}/bin/duply ${config.secrets.location}/backup/${k}/ ${action} --force >> ${varDir}/${k}.log
             ''
-          ) config.services.backup.profiles)}
+          ) config.services.duplyBackup.profiles)}
         '';
       in
         [
index 0e63337d3b4677f098e686c784bdc4ae5e6a1edd..8a09139b8d614945d020c489fe40818eab61ce7e 100644 (file)
@@ -24,7 +24,7 @@ in
   };
 
   config = lib.mkIf config.myServices.buildbot.enable {
-    services.backup.profiles.buildbot = {
+    services.duplyBackup.profiles.buildbot = {
       rootDir = varDir;
     };
     ids.uids.buildbot = myconfig.env.buildbot.user.uid;
index 9de3e6d7b1c82cdae432f6e72a7f6b05b655dad7..337a7fcf4e5e05361efd093f8b3388e307c5df65 100644 (file)
@@ -16,7 +16,7 @@
   };
 
   config = lib.mkIf config.myServices.certificates.enable {
-    services.backup.profiles.system.excludeFile = ''
+    services.duplyBackup.profiles.system.excludeFile = ''
       + ${config.security.acme.directory}
       '';
     services.websites.certs = config.myServices.certificates.certConfig;
index a1da32f5925808125f4d1d64d40442c407a36748..9b6a98f3b21bc318ca7661ddb8f956430839b077 100644 (file)
@@ -14,7 +14,7 @@ in
   };
 
   config = lib.mkIf config.services.pure-ftpd.enable {
-    services.backup.profiles.ftp = {
+    services.duplyBackup.profiles.ftp = {
       rootDir = "/var/lib/ftp";
     };
     security.acme.certs."ftp" = config.myServices.certificates.certConfig // {
index 94ab1340d5bf4fafb772e3880d0eecafc62bf297..658979d99bc65670360f3f73974f92e456b8f708 100644 (file)
@@ -15,7 +15,7 @@ in {
       snippet = builtins.readFile ./ldap_gitolite.sh;
       dependencies = [ pkgs.gitolite ];
     }];
-    services.backup.profiles.gitolite = {
+    services.duplyBackup.profiles.gitolite = {
       rootDir = cfg.gitoliteDir;
     };
     networking.firewall.allowedTCPPorts = [ 9418 ];
index 785b34d828047db8428d3e04a318bac090516c7f..4e6eaabd9ee2f656d48cd2742cce9dd6eb09c200 100644 (file)
@@ -17,7 +17,7 @@ in
   };
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.irc = {
+    services.duplyBackup.profiles.irc = {
       rootDir = "/var/lib/bitlbee";
     };
     security.acme.certs."irc" = config.myServices.ircCerts // {
index d3b2a25eba8fd44fd8a579794fdcf9a904f60d8c..8be21a1ef5ce9af30d47ccdcb85136c754845445 100644 (file)
@@ -18,7 +18,7 @@
         mxs = map (zone: "mx-1.${zone.name}") zonesWithMx;
       in builtins.listToAttrs (map (mx: lib.attrsets.nameValuePair mx null) mxs);
     };
-    services.backup.profiles = {
+    services.duplyBackup.profiles = {
       mail = {
         rootDir = "/var/lib";
         excludeFile = lib.mkAfter ''
index dc75e0f9e5e0f1b98cd402228e47d9d739caa844..6220da2b34b35a971f24feae0e0d6a27fd37ed58 100644 (file)
@@ -13,7 +13,7 @@ let
 in
 {
   config = lib.mkIf config.myServices.mail.enable {
-    services.backup.profiles.mail.excludeFile = ''
+    services.duplyBackup.profiles.mail.excludeFile = ''
       + /var/lib/dhparams
       + /var/lib/dovecot
       '';
index 9fdc7bde8e05f0d3b99aff974cc5a164bac4d43a..1386f850a8ddf6fc2da738d75cf6722e2e7983f0 100644 (file)
@@ -1,7 +1,7 @@
 { lib, pkgs, config, myconfig,  ... }:
 {
   config = lib.mkIf config.myServices.mail.enable {
-    services.backup.profiles.mail.excludeFile = ''
+    services.duplyBackup.profiles.mail.excludeFile = ''
       + /var/lib/postfix
       '';
     secrets.keys = [
index 5e0a2392a08b4fd2cb74e9d9075fa9da49e101c1..b5f64d8b879952ff4b57b18f81e656e30343a9c2 100644 (file)
@@ -11,7 +11,7 @@
       '';
   };
   config = lib.mkIf config.myServices.mail.enable {
-    services.backup.profiles.mail.excludeFile = ''
+    services.duplyBackup.profiles.mail.excludeFile = ''
       + /var/lib/rspamd
       '';
     services.cron.systemCronJobs = let
index 902b2b19897f1e875a6e8da0404c87e8fbcf9378..c5acd4004b63aadc3d4e2164dde5471acace57be 100644 (file)
@@ -27,7 +27,7 @@ in
   };
 
   config = lib.mkIf config.myServices.monitoring.enable {
-    services.backup.profiles.monitoring = {
+    services.duplyBackup.profiles.monitoring = {
       rootDir = config.services.naemon.varDir;
     };
     security.sudo.extraRules = [
index 759c9d324fc78dc3ff61aecaa8a2b2027de5da2c..c7e24862e00ad4c038187867e8aba9fb67ba6a9f 100644 (file)
@@ -2,7 +2,7 @@
 {
   options.myServices.mpd.enable = lib.mkEnableOption "enable MPD";
   config = lib.mkIf config.myServices.mpd.enable {
-    services.backup.profiles.mpd = {
+    services.duplyBackup.profiles.mpd = {
       rootDir = "/var/lib/mpd";
     };
     secrets.keys = [
index 7eaabc9d4e1fb77fa74e5defb91e6c53dfcf53c2..835bcec9a094279fd67ceb7bed513df0cef397ec 100644 (file)
@@ -15,7 +15,7 @@
       snippet = builtins.readFile ./ldap_pub.sh;
       dependencies = [ pkgs.coreutils ];
     }];
-    services.backup.profiles.pub = {
+    services.duplyBackup.profiles.pub = {
       rootDir = "/var/lib/pub";
     };
     users.users.pub = let
index c12c2267887ed115a1675a44f6f2476e9f93a990..1ddfd2eb645807d5cfa47a19f0348c58535aaf39 100644 (file)
@@ -1,7 +1,7 @@
 { pkgs, privateFiles, lib, ... }:
 {
   config = {
-    services.backup.profiles.system = {
+    services.duplyBackup.profiles.system = {
       rootDir = "/var/lib";
       excludeFile = lib.mkAfter ''
         + /var/lib/nixos
index 079216bd63ff80358b64b302a0a78192ec505010..5384bc2e8c418c4bbf0bd26e38be90527100e849 100644 (file)
@@ -34,7 +34,7 @@
   myServices.websites.enable = true;
   myServices.mail.enable = true;
   services.pure-ftpd.enable = true;
-  services.backup.enable = true;
+  services.duplyBackup.enable = true;
 
   deployment = {
     targetEnv = "hetzner";
index 88d3b7ab2c076946a48ed438ec50afdee04629f0..b345e5a3d0469270c7ff5926443eb0fba1fabfa7 100644 (file)
@@ -86,7 +86,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.tasks = {
+    services.duplyBackup.profiles.tasks = {
       rootDir = "/var/lib";
       excludeFile = ''
         + /var/lib/taskserver
index 0c92818e71a77f25d837214b1f967a83635be6c0..7aadf58e2380c3676a13ca912fa88f3cf6cec99c 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.aten.integration.enable = lib.mkEnableOption "enable Aten's website in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.aten_dev.rootDir = app.varDir;
+    services.duplyBackup.profiles.aten_dev.rootDir = app.varDir;
     services.phpApplication.apps.aten_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
index 2ffcef339f6cf4b607aad8ffdaae7f3ae966ec6f..16a909a02ad186cee8dd5cba3d1c9a1654571662 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.aten.production.enable = lib.mkEnableOption "enable Aten's website in production";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.aten_prod.rootDir = app.varDir;
+    services.duplyBackup.profiles.aten_prod.rootDir = app.varDir;
     services.webstats.sites = [ { name = "aten.pro"; } ];
     services.phpApplication.apps.aten_prod = {
       websiteEnv = "production";
index 75e25afbae83ad4aa5a7c7057c6624a67c2d5ed2..00c76a5b7ef5b961915228d8f998a52b391d30b6 100644 (file)
@@ -12,7 +12,7 @@ in {
   options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.chloe_dev.rootDir = chloe.app.varDir;
+    services.duplyBackup.profiles.chloe_dev.rootDir = chloe.app.varDir;
     secrets.keys = chloe.keys;
     systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps;
     systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps;
index 7c59806c988cfb268f6c3463f1c67434b1197bc8..0562de8d2f825f3fc6ea670aa4c4e444111d143f 100644 (file)
@@ -12,7 +12,7 @@ in {
   options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.chloe_prod.rootDir = chloe.app.varDir;
+    services.duplyBackup.profiles.chloe_prod.rootDir = chloe.app.varDir;
     secrets.keys = chloe.keys;
     services.webstats.sites = [ { name = "osteopathe-cc.fr"; } ];
 
index fee8e4f140b393e8aceb41560695db4584d31a74..54dbf54f7b13db3c70e23696b467466984440359 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.connexionswing.integration.enable = lib.mkEnableOption "enable Connexionswing's website in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.connexionswing_dev.rootDir = app.varDir;
+    services.duplyBackup.profiles.connexionswing_dev.rootDir = app.varDir;
     services.phpApplication.apps.connexionswing_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
index 79e672a254a891dc672b729793656d74807deed6..af37e290a95bb0444635a4d2d9991b375b55bdc8 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.connexionswing.production.enable = lib.mkEnableOption "enable Connexionswing's website in production";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.connexionswing_prod.rootDir = app.varDir;
+    services.duplyBackup.profiles.connexionswing_prod.rootDir = app.varDir;
     services.webstats.sites = [ { name = "connexionswing.com"; } ];
     services.phpApplication.apps.connexionswing_prod = {
       websiteEnv = "production";
index 119d62e565251a45687bad76cc06d708a2c10e55..87fdd73fdbf6ea725f6dd1a27aa9d943a2b57d72 100644 (file)
@@ -77,7 +77,7 @@ in
   };
 
   config = lib.mkIf config.myServices.websites.enable {
-    services.backup.profiles.php = {
+    services.duplyBackup.profiles.php = {
       rootDir = "/var/lib/php";
     };
     users.users.wwwrun.extraGroups = [ "keys" ];
index 0dab316489f723b13d052c7ab4f53a4eb737a225..5bf39c9d7b06252992c76910f7184d98067303ce 100644 (file)
@@ -43,7 +43,7 @@ in {
   options.myServices.websites.emilia.production.enable = lib.mkEnableOption "enable Emilia's website";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.emilia_prod = {
+    services.duplyBackup.profiles.emilia_prod = {
       rootDir = varDir;
     };
     system.activationScripts.emilia = ''
index 7e2c33390faf5eb2834947d2b2c5952e067ad068..e6e16faeee62ccbb9051b184d344c190cef67147 100644 (file)
@@ -9,7 +9,7 @@ in {
   options.myServices.websites.florian.app.enable = lib.mkEnableOption "enable Florian's app in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.tellesflorian_dev.rootDir = app.varDir;
+    services.duplyBackup.profiles.tellesflorian_dev.rootDir = app.varDir;
     services.phpApplication.apps.florian_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
index d1b8f9b846bf2b5b4bf0db009eec9266521482db..5d9afc138990f52fda48ab2019156f85c5133f80 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.ludivinecassal.integration.enable = lib.mkEnableOption "enable Ludivine's website in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.ludivinecassal_dev.rootDir = app.varDir;
+    services.duplyBackup.profiles.ludivinecassal_dev.rootDir = app.varDir;
     services.phpApplication.apps.ludivinecassal_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
index 341fd6d97d22dbd905bc788e4b84da582fb2a0e9..1a8b958c9874bd466af471c3ccb304fcb3b6c7ce 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.ludivinecassal.production.enable = lib.mkEnableOption "enable Ludivine's website in production";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.ludivinecassal_prod.rootDir = app.varDir;
+    services.duplyBackup.profiles.ludivinecassal_prod.rootDir = app.varDir;
     services.webstats.sites = [ { name = "ludivinecassal.com"; } ];
     services.phpApplication.apps.ludivinecassal_prod = {
       websiteEnv = "production";
index 853fcff2bc60a7f8bedc4f1b14d1619cffe9be47..8d7cf3af1bb70017c7ac5efbaf85ef787b6b2049 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.piedsjaloux.integration.enable = lib.mkEnableOption "enable PiedsJaloux's website in integration";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.piedsjaloux_dev.rootDir = app.varDir;
+    services.duplyBackup.profiles.piedsjaloux_dev.rootDir = app.varDir;
     services.phpApplication.apps.piedsjaloux_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
index 9e64fca7b864c1372c4743d1523cb79aad7dd860..2267e03fdefdba3f5496853da3247b34ac36f2cd 100644 (file)
@@ -8,7 +8,7 @@ in {
   options.myServices.websites.piedsjaloux.production.enable = lib.mkEnableOption "enable PiedsJaloux's website in production";
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.piedsjaloux_prod.rootDir = app.varDir;
+    services.duplyBackup.profiles.piedsjaloux_prod.rootDir = app.varDir;
     services.webstats.sites = [ { name = "piedsjaloux.fr"; } ];
     services.phpApplication.apps.piedsjaloux_prod = {
       websiteEnv = "production";
index 24d3d51046bf1c3cf044d346c511b2dfe095d7ba..20ae055f3b1274e15279ce6c3cc6c8e40616889c 100644 (file)
@@ -10,7 +10,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.diaspora = {
+    services.duplyBackup.profiles.diaspora = {
       rootDir = dcfg.dataDir;
     };
     users.users.diaspora.extraGroups = [ "keys" ];
index 600254b74865ba8021f0854977ca859cf695ee41..62a169197caa07796e57ec55d8e36629e28e8f3f 100644 (file)
@@ -12,7 +12,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.etherpad-lite = {
+    services.duplyBackup.profiles.etherpad-lite = {
       rootDir = "/var/lib/private/etherpad-lite";
     };
     secrets.keys = [
index 35711af355a5796a87d7da39c3afc5b317fcbe7d..218c3a56d3290321700f929b1ef444794e5bad05 100644 (file)
@@ -17,7 +17,7 @@ in
   ];
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.mail.excludeFile = ''
+    services.duplyBackup.profiles.mail.excludeFile = ''
       + ${rainloop.varDir}
       + ${roundcubemail.varDir}
       '';
index 2236bd55b78b6c391643591a237c8ad6acf493b3..97f2452579cfd44b6bf98091cf57a7c8964b1ca1 100644 (file)
@@ -10,7 +10,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    services.backup.profiles.mastodon = {
+    services.duplyBackup.profiles.mastodon = {
       rootDir = mcfg.dataDir;
     };
     secrets.keys = [{
index 6f27b0be818d1b648dc94e1e42c3d8139efd4828..3cf3e8e2e034be9156852284b20433f207a3df1f 100644 (file)
@@ -51,7 +51,7 @@ in {
       ++ wallabag.keys
       ++ yourls.keys;
 
-    services.backup.profiles = {
+    services.duplyBackup.profiles = {
       dokuwiki = dokuwiki.backups;
       kanboard = kanboard.backups;
       rompr = rompr.backups;
index 6771f015189adeb0da10de88edb9dcb47c20ff5a..e822645c605e162ee14ea3e4638fa327f84ffbb8 100644 (file)
@@ -37,7 +37,7 @@ in {
   };
 
   config = lib.mkIf (builtins.length cfg.sites > 0) {
-    services.backup.profiles.goaccess = {
+    services.duplyBackup.profiles.goaccess = {
       rootDir = cfg.dataDir;
     };
     users.users.root.packages = [