mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: prune restic repo before backup
This commit is contained in:
parent
69ef705820
commit
155f629159
3 changed files with 122 additions and 105 deletions
|
|
@ -7750,7 +7750,7 @@ Here we just define some aliases for rebuilding the system, and we allow some in
|
|||
This manages backups for my pictures and obsidian files.
|
||||
|
||||
#+begin_src nix :tangle modules/nixos/server/restic.nix
|
||||
{ lib, config, inputs, ... }:
|
||||
{ lib, pkgs, config, inputs, ... }:
|
||||
let
|
||||
secretsDirectory = builtins.toString inputs.nix-secrets;
|
||||
resticRepo = lib.swarselsystems.getSecret "${secretsDirectory}/restic/wintersRepo";
|
||||
|
|
@ -7792,6 +7792,9 @@ This manages backups for my pictures and obsidian files.
|
|||
"--keep-monthly 3"
|
||||
"--keep-yearly 100"
|
||||
];
|
||||
backupPrepareCommand = ''
|
||||
${pkgs.restic}/bin/restic prune
|
||||
'';
|
||||
repository = "${resticRepo}";
|
||||
initialize = true;
|
||||
timerConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue