From 47ef05ab310bb466300e93d1459370450414fbc4 Mon Sep 17 00:00:00 2001 From: "grm@eyesin.space" Date: Tue, 2 Sep 2025 23:04:24 +0000 Subject: init --- nixos/restic.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 nixos/restic.nix (limited to 'nixos/restic.nix') diff --git a/nixos/restic.nix b/nixos/restic.nix new file mode 100644 index 0000000..46f0631 --- /dev/null +++ b/nixos/restic.nix @@ -0,0 +1,31 @@ +{ + services.restic.backups = { + periodic = { + initialize = true; + environmentFile = "/root/.config/restic/env"; + repositoryFile = "/root/.config/restic/repository"; + passwordFile = "/root/.config/restic/password"; + + timerConfig = { + OnCalendar = "0/4:00"; + }; + + exclude = [ + "lost+found" + ]; + + paths = [ + "/home" + "/root" + ]; + + pruneOpts = [ + "--keep-hourly 6" + "--keep-daily 7" + "--keep-weekly 2" + "--keep-monthly 12" + "--keep-yearly 1" + ]; + }; + }; +} -- cgit v1.2.3