about summary refs log tree commit diff
path: root/users/glittershark/system/home/modules/tarsnap.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-16T00·02+0100
committerVincent Ambo <mail@tazj.in>2020-06-16T00·02+0100
commit81564185e951f69d490be8f5ad76e8ea642b5dde (patch)
treec27cd8a5bb922f710ff7da4b2942d2db09a95376 /users/glittershark/system/home/modules/tarsnap.nix
parent85d82a9dc262bffa87423f595f7e957c42713798 (diff)
parent3b174300ae60f63f50427cde3bfd680fd3043c3a (diff)
Add 'users/glittershark/system/' from commit '3b174300ae60f63f50427cde3bfd680fd3043c3a' r/975
git-subtree-dir: users/glittershark/system
git-subtree-mainline: 85d82a9dc262bffa87423f595f7e957c42713798
git-subtree-split: 3b174300ae60f63f50427cde3bfd680fd3043c3a
Diffstat (limited to 'users/glittershark/system/home/modules/tarsnap.nix')
-rw-r--r--users/glittershark/system/home/modules/tarsnap.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/users/glittershark/system/home/modules/tarsnap.nix b/users/glittershark/system/home/modules/tarsnap.nix
new file mode 100644
index 000000000000..4bff19910f05
--- /dev/null
+++ b/users/glittershark/system/home/modules/tarsnap.nix
@@ -0,0 +1,64 @@
+{ config, lib, pkgs, ... }:
+
+{
+  home.packages = with pkgs; [
+    tarsnap
+  ];
+
+  home.file.".tarsnaprc".text = ''
+  ### Recommended options
+
+  # Tarsnap cache directory
+  cachedir /home/grfn/.cache/tarsnap
+
+  # Tarsnap key file
+  keyfile /home/grfn/.private/tarsnap.key
+
+  # Don't archive files which have the nodump flag set.
+  nodump
+
+  # Print statistics when creating or deleting archives.
+  print-stats
+
+  # Create a checkpoint once per GB of uploaded data.
+  checkpoint-bytes 1G
+
+  ### Commonly useful options
+
+  # Use SI prefixes to make numbers printed by --print-stats more readable.
+  humanize-numbers
+
+  ### Other options, not applicable to most systems
+
+  # Aggressive network behaviour: Use multiple TCP connections when
+  # writing archives.  Use of this option is recommended only in
+  # cases where TCP congestion control is known to be the limiting
+  # factor in upload performance.
+  #aggressive-networking
+
+  # Exclude files and directories matching specified patterns.
+  # Only one file or directory per command; multiple "exclude"
+  # commands may be given.
+  #exclude
+
+  # Include only files and directories matching specified patterns.
+  # Only one file or directory per command; multiple "include"
+  # commands may be given.
+  #include
+
+  # Attempt to reduce tarsnap memory consumption.  This option
+  # will slow down the process of creating archives, but may help
+  # on systems where the average size of files being backed up is
+  # less than 1 MB.
+  #lowmem
+
+  # Try even harder to reduce tarsnap memory consumption.  This can
+  # significantly slow down tarsnap, but reduces its memory usage
+  # by an additional factor of 2 beyond what the lowmem option does.
+  #verylowmem
+
+  # Snapshot time.  Use this option if you are backing up files
+  # from a filesystem snapshot rather than from a "live" filesystem.
+  #snaptime <file>
+  '';
+}