nix/host/home/Backup.nix

32 lines
557 B
Nix
Raw Normal View History

{ pkgs, ... }: {
systemd.services.backup = {
enable = true;
description = "Home system backup.";
serviceConfig = {
Type = "oneshot";
ExecStart = ./bin/Backup;
};
path = with pkgs; [
bashInteractive
curl
gnutar
gzip
gawk
pv
];
2024-03-24 16:04:07 +03:00
environment = {
BASH_PATH = ../../module/common/bash;
};
# wantedBy = [ "multi-user.target" ];
};
systemd.timers.backup = {
timerConfig = {
OnCalendar = "*-*-* 06:00:00";
Persistent = true;
Unit = "backup.service";
};
wantedBy = [ "timers.target" ];
};
}