3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #272169 from nyabinary/remove-deprecated-network-interfaces

nixos/network-interfaces: remove network-interfaces.target
This commit is contained in:
Guillaume Girol 2024-01-14 14:17:14 +01:00 committed by GitHub
commit e52366c4d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View file

@ -65,6 +65,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the freeform type and option named `services.paperless.settings`.
- The legacy and long deprecated systemd target `network-interfaces.target` has been removed. Use `network.target` instead.
- `mkosi` was updated to v19. Parts of the user interface have changed. Consult the
[release notes](https://github.com/systemd/mkosi/releases/tag/v19) for a list of changes.

View file

@ -451,6 +451,21 @@ in
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.nssModules = [ cfg.package.out ];

View file

@ -1449,16 +1449,6 @@ in
listToAttrs
];
# The network-interfaces target is kept for backwards compatibility.
# New modules must NOT use it.
systemd.targets.network-interfaces =
{ description = "All Network Interfaces (deprecated)";
wantedBy = [ "network.target" ];
before = [ "network.target" ];
after = [ "network-pre.target" ];
unitConfig.X-StopOnReconfiguration = true;
};
systemd.services = {
network-local-commands = {
description = "Extra networking commands.";