fix(nixos): conditionally apply onFailure units

- Wrap `config.onFailure` in `mkIf cfg.enable` to ensure units are conditionally applied based on the service's `enable` configuration.
- Prevents unnecessary configuration of failure units when the service is disabled.
This commit is contained in:
Harald Hoyer 2026-03-25 11:11:00 +01:00
parent 6126aa9142
commit 51398185e7

View file

@ -77,7 +77,7 @@ in
type = type =
with types; with types;
attrsOf (submodule { attrsOf (submodule {
config.onFailure = onFailureUnits; config.onFailure = mkIf cfg.enable onFailureUnits;
}); });
}; };
}; };