From 838f85f25de15f5d459499ae2adea38a321b6b68 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Tue, 25 Mar 2025 16:41:31 +0100 Subject: [PATCH 1/2] moved dua to minimal-terminal. --- roles/home-manager/minimal-terminal.nix | 1 + roles/home-manager/terminal.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/home-manager/minimal-terminal.nix b/roles/home-manager/minimal-terminal.nix index dcf228e..c022539 100644 --- a/roles/home-manager/minimal-terminal.nix +++ b/roles/home-manager/minimal-terminal.nix @@ -21,6 +21,7 @@ home.packages = with pkgs; [ sshfs just + dua fd sd curl diff --git a/roles/home-manager/terminal.nix b/roles/home-manager/terminal.nix index 739e99a..e6ec45e 100644 --- a/roles/home-manager/terminal.nix +++ b/roles/home-manager/terminal.nix @@ -21,7 +21,6 @@ home.packages = with pkgs; [ tre-command hyperfine - dua fclones libqalculate ]; From e46677a3f6ac9354ea0e380fe1b952c85d0855dc Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Tue, 25 Mar 2025 17:41:01 +0100 Subject: [PATCH 2/2] added backup pruning to restic. Only done on the restic host itself, as no remote can do it due to --append-only. --- hosts/cirrostratus/restic.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/cirrostratus/restic.nix b/hosts/cirrostratus/restic.nix index 8710671..ec4c372 100644 --- a/hosts/cirrostratus/restic.nix +++ b/hosts/cirrostratus/restic.nix @@ -42,14 +42,21 @@ in { ]; services.restic.backups = lib.mkIf (inputs ? nix-secrets) { - remote = { - repositoryFile = config.sops.secrets.restic-url.path; + local = { + repositoryFile = "/backup/restic/"; passwordFile = config.sops.secrets.restic-password.path; initialize = true; paths = [ "/storage/syncthing" "/storage/factorio" ]; + pruneOpts=[ + "--keep-within 14d" + "--keep-daily 14" + "--keep-weekly 8" + "--keep-monthly 12" + "--keep-yearly 10" + ]; timerConfig = { OnCalendar = "daily"; Persistent = true;