nixos/network-interfaces: add assertion if used in after or wants
This commit is contained in:
parent
9e2cd6f872
commit
c0ef1f9479
1 changed files with 15 additions and 0 deletions
|
@ -451,6 +451,21 @@ in
|
||||||
cfg.services
|
cfg.services
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assertions = concatLists (
|
||||||
|
mapAttrsToList
|
||||||
|
(name: service:
|
||||||
|
map (message: {
|
||||||
|
assertion = false;
|
||||||
|
inherit message;
|
||||||
|
}) (concatLists [
|
||||||
|
(optional ((builtins.elem "network-interfaces.target" service.after) || (builtins.elem "network-interfaces.target" service.wants))
|
||||||
|
"Service '${name}.service' is using the deprecated target network-interfaces.target, which no longer exists. Using network.target is recommended instead."
|
||||||
|
)
|
||||||
|
])
|
||||||
|
)
|
||||||
|
cfg.services
|
||||||
|
);
|
||||||
|
|
||||||
system.build.units = cfg.units;
|
system.build.units = cfg.units;
|
||||||
|
|
||||||
system.nssModules = [ cfg.package.out ];
|
system.nssModules = [ cfg.package.out ];
|
||||||
|
|
Loading…
Reference in a new issue