mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-02-09 22:28:55 -05:00
backups on handlerone again
This commit is contained in:
parent
fcf401900a
commit
84c6a50871
2 changed files with 52 additions and 0 deletions
49
hosts/nixos/HandlerOne/backup.nix
Normal file
49
hosts/nixos/HandlerOne/backup.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
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"
|
||||
|
||||
# grocy
|
||||
"/var/lib/grocy"
|
||||
|
||||
# actualbudget
|
||||
"${volumePath}/actualbudget"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.overseer.enable {
|
||||
# Restic secrets
|
||||
sops.secrets."restic/borg-base/url" = {};
|
||||
sops.secrets."restic/borg-base/key" = {};
|
||||
|
||||
services.restic.backups = {
|
||||
borg-base =
|
||||
restic-default
|
||||
// {
|
||||
repositoryFile = config.sops.secrets."restic/borg-base/url".path;
|
||||
passwordFile = config.sops.secrets."restic/borg-base/key".path;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -14,6 +14,9 @@
|
|||
# Hardware
|
||||
./hardware-configuration.nix
|
||||
|
||||
# FIXME(TODO): Turn this into it's own backup module
|
||||
./backup.nix
|
||||
|
||||
# Disks
|
||||
inputs.disko.nixosModules.disko
|
||||
(lib.custom.relativeToRoot "hosts/common/disks/btrfs-disk.nix")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue