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!

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

2 Likes

That was easy! Thanks for your help!

For reference, I made an issue as this seems to have bitten multiple people: https://github.com/NixOS/nixpkgs/issues/180175

2 Likes