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:
@@ -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>} "$@"
|
||||||
|
'')
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user