Need to reinstall Network Manager

Hello,

I was copying a snippet I had from the nixos wiki for podman system wide. It kept giving me errors so I started slowing removing stuff. One thing was networking.networkmanager.enable

I then rebuild the system and course I don’t have network manager anymore.. I do have it in the previous generations.

How can I fix this.

Add back the option, then rebuild with nixos-rebuild boot --offline.

Unless you garbage collected, you shouldn’t even need to reboot to an older generation.

Says unable to download could not resolve hostname.

Error: (ignored)

Command ‘‘nix-build <nixpkgs/nixos>’ –attr config.system.build.toplevel –no-out-link’ returned non zero exit status 1.

Sorry guys typing on my phone don’t know the code tags off hand

You should be able to just roll back: nixos-rebuild switch –rollback (if generation with NM was previous one). Or use nixos-rebuild list-generations and then use /nix/var/nix/profiles/system-N-link/bin/switch-to-configuration switch where N is the generation number you want to switch to.

2 Likes

Or reboot, hold space, and select an older generation; switching at runtime might not activate all the kernel modules and services you need.

More of the error message would have been nice, hard to tell whether you’re missing the --offline flag or if something else is wrong.