diff --git a/hosts/alyssum/default.nix b/hosts/alyssum/default.nix index 255380a..870915a 100644 --- a/hosts/alyssum/default.nix +++ b/hosts/alyssum/default.nix @@ -37,6 +37,7 @@ ./networking.nix ./restic.nix ./samba.nix + ./snapper.nix ../../users/hana ]; diff --git a/hosts/alyssum/restic.nix b/hosts/alyssum/restic.nix index cfbea11..f5268b7 100644 --- a/hosts/alyssum/restic.nix +++ b/hosts/alyssum/restic.nix @@ -13,14 +13,14 @@ repositoryFile = config.age.secrets.restic_url.path; paths = ["/flower"]; + exclude = ["/.snapshots"]; timerConfig = { - # every 30mns - OnCalendar = "*-*-* *:00,30:00"; + # every 6 hours + OnCalendar = "*-*-* 00,06,12,18:00:00"; Persistent = true; }; pruneOpts = [ - "--keep-last 24" - "--keep-hourly 24" + "--keep-last 8" "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" diff --git a/hosts/alyssum/snapper.nix b/hosts/alyssum/snapper.nix new file mode 100644 index 0000000..0196fe6 --- /dev/null +++ b/hosts/alyssum/snapper.nix @@ -0,0 +1,19 @@ +{ ... }: { + services.snapper = { + cleanupInterval = "1h"; + persistentTimer = true; + snapshotInterval = "*-*-* *:00,30:00"; + configs.home = { + FSTYPE = "btrfs"; + SUBVOLUME = "/flower"; + TIMELINE_CLEANUP = true; + TIMELINE_CREATE = true; + TIMELINE_MIN_AGE = "86400"; + TIMELINE_LIMIT_HOURLY = "24"; + TIMELINE_LIMIT_DAILY = "7"; + TIMELINE_LIMIT_WEEKLY = "5"; + TIMELINE_LIMIT_MONTHLY = "3"; + TIMELINE_LIMIT_YEARLY = "0"; + }; + }; +} diff --git a/modules/system/tailscale.nix b/modules/system/tailscale.nix index 5e3e044..16205f9 100644 --- a/modules/system/tailscale.nix +++ b/modules/system/tailscale.nix @@ -10,4 +10,7 @@ openFirewall = true; useRoutingFeatures = if config.me.environment == "headless" then "both" else "client"; }; + systemd.services.tailscaled.serviceConfig.LogFilterPatterns = [ + "~magicsock.*does not know about peer.*removing route" + ]; }