How to disable NetworkManager-wait-online.service in the configuration file

Hey everyone,

I am using NixOS Unstable on my laptop and want to disable NetworkManager-wait-online.service in my configuration.nix, but I did not find any option under networking.networkmanager . I am able to do it using:

sudo systemctl disable NetworkManager-wait-online.service

but is there a way to add something to my configuration.nix file to disable this service and make it reproducible?

Thanks in advance for any guidance!

1 Like

You can simply add this to your configuration.nix: systemd.services.NetworkManager-wait-online.enable = false;

5 Likes

That was easy! Thanks for your help!

For reference, I made an issue as this seems to have bitten multiple people: NetworkManager's nm-online kills nixos-rebuild · Issue #180175 · NixOS/nixpkgs · GitHub

3 Likes