nix-config/pkgs/offline-backups/default.nix

18 lines
366 B
Nix
Raw Normal View History

2023-08-13 12:30:14 +02:00
{ pkgs, ... }:
pkgs.writeShellApplication {
name = "offline-backups";
runtimeInputs = [ "systemd" "btrbk" "doas" ];
text = ''
for x in 0 1 2; do
systemctl start "mnt-backups-''${x}.mount"
done && \
doas -u btrbk \
btrbk \
--config /etc/btrbk/offline-backups.conf \
--progress \
--verbose \
"$@"
'';
}