mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Improve the restic-healthchecks module
This commit is contained in:
parent
e6989963c7
commit
3926a6eeb9
1 changed files with 2 additions and 4 deletions
|
|
@ -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 [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue