From 48d8bacea8a961fdc306c788901da963fb38c549 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 21 Apr 2025 13:53:21 -0400 Subject: [PATCH] change backup frequency --- home/yt/ytnix.nix | 1 + hosts/chunk/postgres.nix | 5 +---- hosts/ytnix/default.nix | 2 +- modules/backup.nix | 7 ++++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index f22d425..8afd45e 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -53,6 +53,7 @@ toolchain: toolchain.default.override { extensions = [ "rust-src" ]; + targets = [ "aarch64-unknown-linux-musl" ]; } )) pwgen diff --git a/hosts/chunk/postgres.nix b/hosts/chunk/postgres.nix index 07a3125..c4a6233 100644 --- a/hosts/chunk/postgres.nix +++ b/hosts/chunk/postgres.nix @@ -19,8 +19,5 @@ } ]; }; - services.postgresqlBackup = { - enable = true; - startAt = "hourly"; - }; + services.postgresqlBackup.enable = true; } diff --git a/hosts/ytnix/default.nix b/hosts/ytnix/default.nix index ddf1364..c3759fa 100644 --- a/hosts/ytnix/default.nix +++ b/hosts/ytnix/default.nix @@ -87,7 +87,7 @@ resolvconf.enable = true; firewall = { enable = true; - trustedInterfaces = [ "tailscale0" ]; + trustedInterfaces = [ "tailscale0" "virbr0" ]; # allowedTCPPorts = [ # 8080 # mitmproxy # 22000 # syncthing diff --git a/modules/backup.nix b/modules/backup.nix index 2715deb..a07542d 100644 --- a/modules/backup.nix +++ b/modules/backup.nix @@ -47,7 +47,7 @@ in }; startAt = lib.mkOption { type = lib.types.str; - default = "hourly"; + default = "daily"; description = "see systemd.timer(5)"; }; jobName = lib.mkOption { @@ -98,8 +98,9 @@ in failOnWarnings = false; prune.keep = { - within = "2d"; - daily = 365; + daily = 7; + weekly = 12; + monthly = -1; }; extraPruneArgs = [ "--stats" ]; };