nix-git/modules/btrbk/default.nix

26 lines
773 B
Nix
Raw Normal View History

2023-11-16 11:32:15 +01:00
# 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)"
# #=> ExecStart=/nix/store/53nvbl1c0w14524j7v3fpn9py31yi2hb-btrbk-0.32.6/bin/btrbk -c /etc/btrbk/local-backup.conf run
2023-09-27 18:56:12 +02:00
{ config, pkgs, ... }:
{
2023-11-17 15:06:01 +01:00
imports = [
./snapshot.nix
./backup.nix
];
2023-09-27 18:56:12 +02:00
services.btrbk = {
# Lowest scheduling priority.
niceness = 19;
2023-11-17 15:06:01 +01:00
# The `instances` option is set by `./snapshot.nix` and `./backup.nix`.
2023-09-27 18:56:12 +02:00
};
}