1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 04:11:07 +01:00
Files
niveum/configs/backup.nix

22 lines
522 B
Nix
Raw Normal View History

2022-01-18 22:38:28 +01:00
{ pkgs, config, ... }:
let
repository = "rest:http://zaatar.r:3571/";
in
2022-01-18 21:29:30 +01:00
{
services.restic.backups.niveum = {
initialize = true;
2022-01-18 22:38:28 +01:00
inherit repository;
2022-01-18 21:29:30 +01:00
timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; };
passwordFile = toString <secrets/restic/password>;
paths = [
"/home/kfm/work"
];
};
2022-01-18 22:38:28 +01:00
environment.systemPackages = [
(pkgs.writers.writeDashBin "restic-niveum" ''
${pkgs.restic}/bin/restic -r ${repository} -p ${<secrets/restic/password>} "$@"
'')
];
2022-01-18 21:29:30 +01:00
}