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

18 lines
366 B
Nix

{ 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 \
"$@"
'';
}