nix-git/modules/btrbk/default.nix

57 lines
1.6 KiB
Nix
Raw Normal View History

2023-09-27 18:56:12 +02:00
{ config, pkgs, ... }:
{
# For each instance, a service and timer will be created:
# systemctl list-unit-files | grep btrbk
# #=> btrbk-<instance-name>.service
# #=> btrbk-<instance-name>.timer
#
# If onCalendar is set to null, one can manually execute btrbk with
# sudo systemctl start btrbk-<instance-name>.service
# Print generated systemd unit file
# cat "$(systemctl show -P FragmentPath btrbk-<instance-name>.service)"
services.btrbk = {
extraPackages = [ pkgs.lz4 ];
# Lowest scheduling priority.
niceness = 19;
# Set of btrbk instances. The instance named btrbk is the default one.
instances = {
"local-snapshots" = {
onCalendar = "hourly";
#onCalendar = "*:0/15"; # Every 15min
settings = {
timestamp_format = "long";
stream_compress = "lz4";
snapshot_preserve_min = "2d";
snapshot_preserve = "24h 7d 4w 6m";
volume."/mnt/data/data" = {
snapshot_dir = "/mnt/data/snap";
subvolume = {
"arch.p1st.de" = {};
"blogger.privacy1st.de" = {};
"changedetection.p1st.de" = {};
"cloud.media-kollektiv.eu" = {};
"cloud.privacy1st.de" = {};
"git.privacy1st.de" = {};
#"mastodon-toot-follower.privacy1st.de" = {};
"money.p1st.de" = {};
"music.privacy1st.de" = {};
#"paste.p1st.de" = {};
"proxy" = {};
"recipe.privacy1st.de" = {};
"traggo.privacy1st.de" = {};
};
};
};
};
};
};
}