Skip to content

Commit

Permalink
nixos/networkmanager: match upstream units Install sections (NixOS#36…
Browse files Browse the repository at this point in the history
  • Loading branch information
arianvp authored Dec 28, 2024
2 parents a35b4a5 + a00e827 commit 253d319
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ in
];

systemd.services.NetworkManager = {
wantedBy = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];

aliases = [ "dbus-org.freedesktop.NetworkManager.service" ];
Expand All @@ -614,7 +614,7 @@ in
};

systemd.services.NetworkManager-dispatcher = {
wantedBy = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [
configFile
overrideNameserversScript
Expand Down
11 changes: 11 additions & 0 deletions nixos/tests/networking/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ let
};
} extraConfig;
testCases = {
startup = {
name = "startup";
nodes.client = {
networking.useDHCP = false;
networking.networkmanager.enable = true;
};
testScript = ''
with subtest("NetworkManager is started automatically at boot"):
client.wait_for_unit("NetworkManager.service")
'';
};
static = {
name = "static";
nodes = {
Expand Down

0 comments on commit 253d319

Please sign in to comment.