1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(restic): add wrapper command

This commit is contained in:
2022-01-18 22:38:28 +01:00
parent efb8dff677
commit 59c420e8b0

View File

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