diff --git a/modules/hosts/john-pc-ubuntu.nix b/modules/hosts/john-pc-ubuntu.nix index fcd9cc0..42f45f3 100644 --- a/modules/hosts/john-pc-ubuntu.nix +++ b/modules/hosts/john-pc-ubuntu.nix @@ -16,13 +16,12 @@ in imports = with inputs.self.modules.homeManager; [ rebuild john - resticprofile sops - docker - desktop step-ssh-user mtls restic + docker + desktop ]; targets.genericLinux.enable = true; @@ -88,6 +87,13 @@ in "${config.xdg.userDirs.documents}" "/conf" ]; + exclude = [ + "/home/*/Pictures" + "/home/*/Videos" + "/home/*/go" + "/home/*/snap" + "/home/john/john-nas" + ]; }; # programs.resticprofile = { diff --git a/modules/services/restic/restic.nix b/modules/services/restic/restic.nix index 4ddcca8..7f999d2 100644 --- a/modules/services/restic/restic.nix +++ b/modules/services/restic/restic.nix @@ -19,6 +19,11 @@ type = lib.types.listOf lib.types.str; default = [ ]; }; + exclude = lib.mkOption { + description = "List of string paths to include in the backup. There are already some common ones included by default."; + type = lib.types.listOf lib.types.str; + default = [ ]; + }; }; config = let @@ -59,7 +64,7 @@ "--keep-weekly 8" "--keep-monthly 12" ]; - exclude = [ + exclude = cfg.exclude ++ [ ".cache" ".devenv" ".rustup" @@ -69,6 +74,7 @@ ".vscode*" "data/postgres" "build" + "dist" "__pycache__" "*.log" "*.egg-info" @@ -76,12 +82,6 @@ "*.m4a" ".local/share/Steam" ".local/share/Trash" - "dist" - "/home/*/Pictures" - "/home/*/Videos" - "/home/*/go" - "/home/*/snap" - "/home/john/john-nas" ]; }; };