diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-10-24 00:35:49 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-25 00:04:31 +0200 |
commit | 01938a297abdb89c79d7d03247a68e93937d47f7 (patch) | |
tree | f8dcc597c0c8047c0e6a4d3ac7f131e881f74ce6 | |
parent | ee06505ff39584e4ce6caeeb7ea7215c7d84224a (diff) | |
download | NUR-01938a297abdb89c79d7d03247a68e93937d47f7.tar.gz NUR-01938a297abdb89c79d7d03247a68e93937d47f7.tar.zst NUR-01938a297abdb89c79d7d03247a68e93937d47f7.zip |
Rename backup module to duply_backup
-rw-r--r-- | modules/default.nix | 2 | ||||
-rw-r--r-- | modules/duply_backup/default.nix (renamed from modules/backup/default.nix) | 10 | ||||
-rw-r--r-- | modules/webapps/webstats/default.nix | 2 |
3 files changed, 7 insertions, 7 deletions
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 @@ | |||
13 | opendmarc = ./opendmarc.nix; | 13 | opendmarc = ./opendmarc.nix; |
14 | openarc = ./openarc.nix; | 14 | openarc = ./openarc.nix; |
15 | 15 | ||
16 | backup = ./backup; | 16 | duplyBackup = ./duply_backup; |
17 | naemon = ./naemon; | 17 | naemon = ./naemon; |
18 | 18 | ||
19 | php-application = ./websites/php-application.nix; | 19 | php-application = ./websites/php-application.nix; |
diff --git a/modules/backup/default.nix b/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 | |||
27 | in | 27 | in |
28 | { | 28 | { |
29 | options = { | 29 | options = { |
30 | services.backup.enable = lib.mkOption { | 30 | services.duplyBackup.enable = lib.mkOption { |
31 | type = lib.types.bool; | 31 | type = lib.types.bool; |
32 | default = false; | 32 | default = false; |
33 | description = '' | 33 | description = '' |
34 | Whether to enable remote backups. | 34 | Whether to enable remote backups. |
35 | ''; | 35 | ''; |
36 | }; | 36 | }; |
37 | services.backup.profiles = lib.mkOption { | 37 | services.duplyBackup.profiles = lib.mkOption { |
38 | type = lib.types.attrsOf (lib.types.submodule { | 38 | type = lib.types.attrsOf (lib.types.submodule { |
39 | options = { | 39 | options = { |
40 | rootDir = lib.mkOption { | 40 | rootDir = lib.mkOption { |
@@ -55,7 +55,7 @@ in | |||
55 | }; | 55 | }; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | config = lib.mkIf config.services.backup.enable { | 58 | config = lib.mkIf config.services.duplyBackup.enable { |
59 | system.activationScripts.backup = '' | 59 | system.activationScripts.backup = '' |
60 | install -m 0700 -o root -g root -d ${varDir} ${varDir}/caches | 60 | install -m 0700 -o root -g root -d ${varDir} ${varDir}/caches |
61 | ''; | 61 | ''; |
@@ -70,7 +70,7 @@ in | |||
70 | dest = "backup/${k}/exclude"; | 70 | dest = "backup/${k}/exclude"; |
71 | text = v.excludeFile; | 71 | text = v.excludeFile; |
72 | } | 72 | } |
73 | ]) config.services.backup.profiles); | 73 | ]) config.services.duplyBackup.profiles); |
74 | 74 | ||
75 | services.cron = { | 75 | services.cron = { |
76 | enable = true; | 76 | enable = true; |
@@ -83,7 +83,7 @@ in | |||
83 | touch ${varDir}/${k}.log | 83 | touch ${varDir}/${k}.log |
84 | ${pkgs.duply}/bin/duply ${config.secrets.location}/backup/${k}/ ${action} --force >> ${varDir}/${k}.log | 84 | ${pkgs.duply}/bin/duply ${config.secrets.location}/backup/${k}/ ${action} --force >> ${varDir}/${k}.log |
85 | '' | 85 | '' |
86 | ) config.services.backup.profiles)} | 86 | ) config.services.duplyBackup.profiles)} |
87 | ''; | 87 | ''; |
88 | in | 88 | in |
89 | [ | 89 | [ |
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 { | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | config = lib.mkIf (builtins.length cfg.sites > 0) { | 39 | config = lib.mkIf (builtins.length cfg.sites > 0) { |
40 | services.backup.profiles.goaccess = { | 40 | services.duplyBackup.profiles.goaccess = { |
41 | rootDir = cfg.dataDir; | 41 | rootDir = cfg.dataDir; |
42 | }; | 42 | }; |
43 | users.users.root.packages = [ | 43 | users.users.root.packages = [ |