]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.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>
Fri, 24 Apr 2020 22:04:31 +0000 (00:04 +0200)
modules/default.nix
modules/duply_backup/default.nix [moved from modules/backup/default.nix with 91% similarity]
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 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 = [