From 01938a297abdb89c79d7d03247a68e93937d47f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 24 Oct 2019 00:35:49 +0200 Subject: [PATCH] Rename backup module to duply_backup --- modules/default.nix | 2 +- modules/{backup => duply_backup}/default.nix | 10 +++++----- modules/webapps/webstats/default.nix | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename modules/{backup => duply_backup}/default.nix (91%) diff --git a/modules/default.nix b/modules/default.nix index 05f2bfe0..18bee9af 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,7 +13,7 @@ opendmarc = ./opendmarc.nix; openarc = ./openarc.nix; - backup = ./backup; + duplyBackup = ./duply_backup; naemon = ./naemon; php-application = ./websites/php-application.nix; diff --git a/modules/backup/default.nix b/modules/duply_backup/default.nix similarity index 91% rename from modules/backup/default.nix rename to modules/duply_backup/default.nix index be12231e..32fa9414 100644 --- a/modules/backup/default.nix +++ b/modules/duply_backup/default.nix @@ -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 [ diff --git a/modules/webapps/webstats/default.nix b/modules/webapps/webstats/default.nix index 6771f015..e822645c 100644 --- a/modules/webapps/webstats/default.nix +++ b/modules/webapps/webstats/default.nix @@ -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 = [ -- 2.41.0