mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: cleanup
This commit is contained in:
parent
a8daed1d10
commit
e9da090c2a
67 changed files with 4146 additions and 2727 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.repo.secrets.local) resticRepo;
|
||||
inherit (config.swarselsystems) sopsFile;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.server.restic = lib.mkEnableOption "enable restic backups on server";
|
||||
|
|
@ -8,9 +8,9 @@ in
|
|||
|
||||
sops = {
|
||||
secrets = {
|
||||
resticpw = { };
|
||||
resticaccesskey = { };
|
||||
resticsecretaccesskey = { };
|
||||
resticpw = { inherit sopsFile; };
|
||||
resticaccesskey = { inherit sopsFile; };
|
||||
resticsecretaccesskey = { inherit sopsFile; };
|
||||
};
|
||||
templates = {
|
||||
"restic-env".content = ''
|
||||
|
|
@ -20,35 +20,39 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.restic = {
|
||||
backups = {
|
||||
SwarselWinters = {
|
||||
environmentFile = config.sops.templates."restic-env".path;
|
||||
passwordFile = config.sops.secrets.resticpw.path;
|
||||
paths = [
|
||||
"/Vault/data/paperless"
|
||||
"/Vault/Eternor/Paperless"
|
||||
"/Vault/Eternor/Bilder"
|
||||
"/Vault/Eternor/Immich"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 3"
|
||||
"--keep-weekly 2"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 100"
|
||||
];
|
||||
backupPrepareCommand = ''
|
||||
${pkgs.restic}/bin/restic prune
|
||||
'';
|
||||
repository = "${resticRepo}";
|
||||
initialize = true;
|
||||
timerConfig = {
|
||||
OnCalendar = "03:00";
|
||||
services.restic =
|
||||
let
|
||||
inherit (config.repo.secrets.local) resticRepo;
|
||||
in
|
||||
{
|
||||
backups = {
|
||||
SwarselWinters = {
|
||||
environmentFile = config.sops.templates."restic-env".path;
|
||||
passwordFile = config.sops.secrets.resticpw.path;
|
||||
paths = [
|
||||
"/Vault/data/paperless"
|
||||
"/Vault/Eternor/Paperless"
|
||||
"/Vault/Eternor/Bilder"
|
||||
"/Vault/Eternor/Immich"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 3"
|
||||
"--keep-weekly 2"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 100"
|
||||
];
|
||||
backupPrepareCommand = ''
|
||||
${pkgs.restic}/bin/restic prune
|
||||
'';
|
||||
repository = "${resticRepo}";
|
||||
initialize = true;
|
||||
timerConfig = {
|
||||
OnCalendar = "03:00";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue