diff --git a/home/default.nix b/home/default.nix index 930f579..c752f40 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,5 +1,4 @@ { - config, pkgs, inputs, spicetify-nix, @@ -48,11 +47,6 @@ ./misc_pkgs ./wm ]; - - services.restic.backups.localbackup = { - passwordFile = config.age.secrets.restic-password.path; - environmentFile = config.age.secrets.restic-s3-key.path; - }; }; }; diff --git a/home/essentials/default.nix b/home/essentials/default.nix index 9c34665..2dab1c9 100644 --- a/home/essentials/default.nix +++ b/home/essentials/default.nix @@ -2,7 +2,6 @@ imports = [ ./git.nix ./keyring.nix - ./restic.nix ./ssh.nix ./zsh.nix ]; diff --git a/modules/utils/default.nix b/modules/utils/default.nix index 6ab9934..c14c6ab 100644 --- a/modules/utils/default.nix +++ b/modules/utils/default.nix @@ -3,6 +3,7 @@ ./auth.nix ./docker.nix ./printing.nix + ./restic.nix ./wm.nix ]; } diff --git a/home/essentials/restic.nix b/modules/utils/restic.nix similarity index 59% rename from home/essentials/restic.nix rename to modules/utils/restic.nix index 84c5b6b..eabb0ef 100644 --- a/home/essentials/restic.nix +++ b/modules/utils/restic.nix @@ -1,29 +1,36 @@ -{ ... }: +{ config, ... }: { services.restic = { - enable = true; - backups = { localbackup = { + passwordFile = config.age.secrets.restic-password.path; + environmentFile = config.age.secrets.restic-s3-key.path; + exclude = [ - "/home/$USER/.cache" - "/home/$USER/.local/share/libvirt" - "/home/$USER/.local/share/Steam" - "/home/$USER/.local/share/Trash" - "/home/$USER/Android" + "home/*/.local/share/libvirt" + "home/*/.local/share/Steam" + "home/*/.local/share/Trash" + "home/*/Android" + ".cache" + ".mozilla" ".venv" "venv" ".direnv" ".git" ]; + initialize = true; + paths = [ "/home" ]; + extraBackupArgs = [ "--one-file-system" ]; + repository = "s3:https://s3.filmsli.de/restic-framework"; + pruneOpts = [ "--keep-daily 7" "--keep-weekly 4"