diff --git a/flake.nix b/flake.nix index f7ea358..49c77d0 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 290 current 2025-10-11 11:39:41 25.05.20251006.20c4598 6.12.50 * +# generation: 291 current 2025-10-11 12:01:16 25.05.20251006.20c4598 6.12.50 * { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/gameservers/minecraft_recpro/default.nix b/modules/homelab/gameservers/minecraft_recpro/default.nix index 19675f1..d6d7816 100644 --- a/modules/homelab/gameservers/minecraft_recpro/default.nix +++ b/modules/homelab/gameservers/minecraft_recpro/default.nix @@ -129,9 +129,14 @@ in }; - - - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = lib.listToAttrs ( + lib.mapAttrsToList (serviceName: cfg: + { + name = ${service}; # attribute key + value = { paths = [ cfg.data_dir ]; }; # attribute value + } + ) servers + ); }; } diff --git a/modules/homelab/services/arr/bazarr/default.nix b/modules/homelab/services/arr/bazarr/default.nix index 106139e..043e1de 100644 --- a/modules/homelab/services/arr/bazarr/default.nix +++ b/modules/homelab/services/arr/bazarr/default.nix @@ -81,7 +81,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/arr/prowlarr/default.nix b/modules/homelab/services/arr/prowlarr/default.nix index df883ad..b52ca6d 100644 --- a/modules/homelab/services/arr/prowlarr/default.nix +++ b/modules/homelab/services/arr/prowlarr/default.nix @@ -83,7 +83,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/arr/radarr/default.nix b/modules/homelab/services/arr/radarr/default.nix index 901aca5..3e40e1f 100644 --- a/modules/homelab/services/arr/radarr/default.nix +++ b/modules/homelab/services/arr/radarr/default.nix @@ -86,7 +86,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/arr/sonarr/default.nix b/modules/homelab/services/arr/sonarr/default.nix index f902d24..4467165 100644 --- a/modules/homelab/services/arr/sonarr/default.nix +++ b/modules/homelab/services/arr/sonarr/default.nix @@ -84,7 +84,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/default_temp.nix b/modules/homelab/services/default_temp.nix index b816f17..834468a 100644 --- a/modules/homelab/services/default_temp.nix +++ b/modules/homelab/services/default_temp.nix @@ -102,7 +102,9 @@ in # }; # }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/gitea/default.nix b/modules/homelab/services/gitea/default.nix index 38793b5..b62a943 100644 --- a/modules/homelab/services/gitea/default.nix +++ b/modules/homelab/services/gitea/default.nix @@ -115,7 +115,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/immich/default.nix b/modules/homelab/services/immich/default.nix index 1658952..fdefa8a 100644 --- a/modules/homelab/services/immich/default.nix +++ b/modules/homelab/services/immich/default.nix @@ -96,7 +96,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir "/var/lib/redis-immich" ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir "/var/lib/redis-immich" ]; }; + }; }; } diff --git a/modules/homelab/services/jellyfin/default.nix b/modules/homelab/services/jellyfin/default.nix index d172700..6445c5a 100644 --- a/modules/homelab/services/jellyfin/default.nix +++ b/modules/homelab/services/jellyfin/default.nix @@ -97,7 +97,9 @@ in # }; # }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; } diff --git a/modules/homelab/services/qbittorrent/default.nix b/modules/homelab/services/qbittorrent/default.nix index 9544016..345211b 100644 --- a/modules/homelab/services/qbittorrent/default.nix +++ b/modules/homelab/services/qbittorrent/default.nix @@ -119,7 +119,9 @@ in }; }; - # add to backups - modules.system.backups.paths = lib.mkIf cfg.backup [ cfg.data_dir ]; + # add to backups + modules.system.backups.baks = { + ${service} = { paths = [ cfg.data_dir ]; }; + }; }; }