mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-24 22:29:33 +01:00
29 lines
873 B
Nix
29 lines
873 B
Nix
# 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
|
|
|
|
{ config, pkgs, ... }:
|
|
{
|
|
imports = [
|
|
./snapshot.nix
|
|
./backup.nix
|
|
];
|
|
|
|
services.btrbk = {
|
|
# Transport compression with `lz4`,
|
|
# see `./backup.nix`.
|
|
extraPackages = [ pkgs.lz4 ];
|
|
# Lowest scheduling priority.
|
|
niceness = 19;
|
|
# The `instances` option is set by `./snapshot.nix` and `./backup.nix`.
|
|
};
|
|
}
|