From 3926a6eeb92f8ac6648425a9efa05f29ef4b5f3d Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sat, 7 Jun 2025 15:13:05 +0200 Subject: [PATCH] Improve the restic-healthchecks module --- modules/system/services/restic-backups/healthchecks.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/system/services/restic-backups/healthchecks.nix b/modules/system/services/restic-backups/healthchecks.nix index 1ee0b0d..4925724 100644 --- a/modules/system/services/restic-backups/healthchecks.nix +++ b/modules/system/services/restic-backups/healthchecks.nix @@ -5,10 +5,8 @@ ... }: let - inherit (config.custom.services) resticBackups; - backupsWithHealthchecks = - resticBackups + config.custom.services.resticBackups |> lib.filterAttrs (_: value: value.enable) |> lib.filterAttrs (_: value: value.healthchecks.enable); in @@ -23,7 +21,7 @@ in ); }; - config = lib.mkIf (resticBackups != { }) { + config = lib.mkIf (backupsWithHealthchecks != { }) { sops.secrets."healthchecks-ping-key" = { }; systemd.services = lib.mkMerge [