summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2013-10-06 23:02:41 +0200
committerAristid Breitkreuz <aristidb@gmail.com>2013-10-06 23:02:41 +0200
commitfa1f5e5b7507533476b7cb4e6fc0013c8cecbd23 (patch)
tree47d2b08814ba3732a307d89f3c267f43a09af7c5 /modules
parentcd98acd3a721e48b82f277af5a00235cb77dc4a0 (diff)
downloadnixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar.gz
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar.bz2
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar.lz
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar.xz
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.tar.zst
nixlib-fa1f5e5b7507533476b7cb4e6fc0013c8cecbd23.zip
implement bjornfors comments
Diffstat (limited to 'modules')
-rw-r--r--modules/services/backup/rsnapshot.nix25
1 files changed, 16 insertions, 9 deletions
diff --git a/modules/services/backup/rsnapshot.nix b/modules/services/backup/rsnapshot.nix
index 678296a3e3d2..c4c67ebe35a6 100644
--- a/modules/services/backup/rsnapshot.nix
+++ b/modules/services/backup/rsnapshot.nix
@@ -9,16 +9,23 @@ in
     services.rsnapshot = {
       enable = mkEnableOption "rsnapshot backups";
 
-      configuration = mkOption {
+      extraConfiguration = mkOption {
         default = "";
         example = ''
-          retain hourly 24
-          retain daily 365
-          backup /home/ localhost/
+          retains	hourly	24
+          retain	daily	365
+          backup	/home/	localhost/
         '';
         type = types.lines;
         description = ''
-        rsnapshot configuration option in addition to the defaults from rsnapshot and this module.
+          rsnapshot configuration option in addition to the defaults from
+          rsnapshot and this module.
+
+          Note that tabs are required to separate option arguments, and
+          directory names require trailing slashes.
+
+          The "extra" in the option name might be a little misleading right
+          now, as it is required to get a functional configuration.
         '';
       };
 
@@ -27,9 +34,9 @@ in
         example = { "hourly" = "0 * * * *"; "daily" = "50 21 * * *"; };
         type = types.attrsOf types.string;
         description = ''
-        Periodicity at which intervals should be run by cron.
-        Note that the intervals also have to exist in configuration
-        as retain options.
+          Periodicity at which intervals should be run by cron.
+          Note that the intervals also have to exist in configuration
+          as retain options.
         '';
       };
     };
@@ -51,6 +58,6 @@ in
         cmd_rsnapshot_diff	${rsnapshot}/bin/rsnapshot-diff
         lockfile	/run/rsnapshot.pid
 
-      '' + cfg.configuration);
+      '' + cfg.extraConfiguration);
   };
 }