mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51: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
|
let
|
||||||
inherit (config.custom.services) resticBackups;
|
|
||||||
|
|
||||||
backupsWithHealthchecks =
|
backupsWithHealthchecks =
|
||||||
resticBackups
|
config.custom.services.resticBackups
|
||||||
|> lib.filterAttrs (_: value: value.enable)
|
|> lib.filterAttrs (_: value: value.enable)
|
||||||
|> lib.filterAttrs (_: value: value.healthchecks.enable);
|
|> lib.filterAttrs (_: value: value.healthchecks.enable);
|
||||||
in
|
in
|
||||||
|
|
@ -23,7 +21,7 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (resticBackups != { }) {
|
config = lib.mkIf (backupsWithHealthchecks != { }) {
|
||||||
sops.secrets."healthchecks-ping-key" = { };
|
sops.secrets."healthchecks-ping-key" = { };
|
||||||
|
|
||||||
systemd.services = lib.mkMerge [
|
systemd.services = lib.mkMerge [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue