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:
parent
6126aa9142
commit
51398185e7
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ in
|
||||||
type =
|
type =
|
||||||
with types;
|
with types;
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
config.onFailure = onFailureUnits;
|
config.onFailure = mkIf cfg.enable onFailureUnits;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue