From: Ismaƫl Bouya Date: Wed, 23 Oct 2019 22:35:49 +0000 (+0200) Subject: Rename backup module to duply_backup X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=01938a297abdb89c79d7d03247a68e93937d47f7;p=perso%2FImmae%2FConfig%2FNix%2FNUR.git Rename backup module to duply_backup --- 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 = [