mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-22 06:34:14 -05:00
refactor backup for expansibility
This commit is contained in:
parent
8bc703957f
commit
75c1d44f6d
1 changed files with 26 additions and 21 deletions
|
|
@ -1,5 +1,26 @@
|
|||
let
|
||||
volumePath = "/overseer/services";
|
||||
restic-default = {
|
||||
user = "root";
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
Persistent = true;
|
||||
};
|
||||
paths = [
|
||||
# bar-assistant.nix
|
||||
"${volumePath}/bar-assistant"
|
||||
"${volumePath}/meilisearch"
|
||||
|
||||
# homebox.nix
|
||||
"/var/lib/homebox/data"
|
||||
|
||||
# lubelogger.nix
|
||||
"${volumePath}/lubelogger"
|
||||
|
||||
# trilium.nix
|
||||
"/var/lib/trilium/backup"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
lib,
|
||||
|
|
@ -11,27 +32,11 @@ in
|
|||
sops.secrets."restic/borg-base/url" = {};
|
||||
sops.secrets."restic/borg-base/key" = {};
|
||||
|
||||
services.restic.backups.borg-base = {
|
||||
user = "root";
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
Persistent = true;
|
||||
services.restic.backups = {
|
||||
borg-base = {
|
||||
inherit restic-default;
|
||||
repositoryFile = config.sops.secrets."restic/borg-base/url".path;
|
||||
passwordFile = config.sops.secrets."restic/borg-base/key".path;
|
||||
};
|
||||
paths = [
|
||||
# bar-assistant.nix
|
||||
"${volumePath}/bar-assistant"
|
||||
"${volumePath}/meilisearch"
|
||||
|
||||
# homebox.nix
|
||||
"/var/lib/homebox/data"
|
||||
|
||||
# lubelogger.nix
|
||||
"${volumePath}/lubelogger"
|
||||
|
||||
# trilium.nix
|
||||
"/var/lib/trilium/backup"
|
||||
];
|
||||
repositoryFile = config.sops.secrets."restic/borg-base/url".path;
|
||||
passwordFile = config.sops.secrets."restic/borg-base/key".path;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue