about summary refs log tree commit diff
path: root/users/grfn/system/home/modules/tarsnap.nix
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-04-11T21·53-0400
committerglittershark <grfn@gws.fyi>2021-04-12T14·45+0000
commit6266c5d32f9ff651fcfc3a4cc0c68e89da56ca65 (patch)
tree5be3967585787c4456e17cb29423770217fdcede /users/grfn/system/home/modules/tarsnap.nix
parent968effb5dc1a4617a0dceaffc70e986abe300c6e (diff)
refactor(users/glittershark): Rename to grfn r/2485
Rename my //users directory and all places that refer to glittershark to
grfn, including nix references and documentation.

This may require some extra attention inside of gerrit's database after
it lands to allow me to actually push things.

Change-Id: I4728b7ec2c60024392c1c1fa6e0d4a59b3e266fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2933
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/grfn/system/home/modules/tarsnap.nix')
-rw-r--r--users/grfn/system/home/modules/tarsnap.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/users/grfn/system/home/modules/tarsnap.nix b/users/grfn/system/home/modules/tarsnap.nix
new file mode 100644
index 000000000000..4bff19910f05
--- /dev/null
+++ b/users/grfn/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>
+  '';
+}