Following the NixOS Manual, I i) made a live USB drive, and ii) installed NixOS on my system.

Now I'm trying to set up my wireless network, and "Wireless Networks" instructions aren't working for my install. What did I need to do during the install, or after install, to get this working?

Specifically, I don't have wpa_supplicant.service.

systemctl restart wpa_supplicant.service
Failed to restart wpa_supplicant.service: Unit wpa_supplicant.service not found.

When I just try to run systemctl restart NetworkingService, I get a similar error.

systemctl restart NetworkingService
Failed to restart NetworkingService: Unit NetworkingService not found.

I should mention that I configured networking.wireless.enable = true (in /etc/nixos/configuration.nix). In my case, rerunning nixos-rebuild switch doesn't work because it can't download packages from the internet.

$ nixos-rebuild switch
building Nix...
building the system configuration...
warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 348 ms
warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 619 ms
cannot build derivation '/nix/store/...-wpa_supplicant.service.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/...-nixos-system-

So it looks like I have a chicken and egg problem. I don't have networking, that would allow me to setup networking. I would have imagined that that wpa supplicant package would have been included in the base installation.

Clearly I'm missing something.

  • Which one of the ISO's did you use? Aug 25, 2018 at 7:17
  • @EmmanuelRosa It was NixOS 18.03, downloaded from the download page. And it was the Graphical live CD, 64-bit Intel/AMD. Aug 26, 2018 at 20:50

2 Answers 2


Ok, solved this one.

In /etc/nixos/configuration.nix, the setting networking.wireless.enable = true needed to be enabled at initial installation.

So I went back into the install USB, set that (in the mounted /mnt/etc/nixos/configuration.nix), and reran nixos-install.

From there, i) I rebooted into my updated system, based on the Wireless Networks section of the manual, ii) I generated a wireless configuration with wpa_passphrase <ssid> [passphrase] > /etc/wpa_supplicant.conf. Then iii) restarted the service with systemctl restart wpa_supplicant.service. Et voila!

  • 2
    I'm glad you figured it out! As you use NixOS you'll notice that it's very much an all-hands-on-deck open-source project. There is a small leadership team, but generally speaking it's a flexible, fluid project which adapts to the needs of its participants. I hereby invite you to not only use NixOS but also to contribute to the project as you see fit. For example, what you encountered is a defect in the installation documentation, thus I hope you'll consider contributing your findings to the NixOS installation documentation :) If I recall it's written in DocBook (XML). Aug 27, 2018 at 2:51
  • @EmmanuelRosa Thanks for the invite. I definitely like the philosophy and tech behind Nix/OS. I'll contribute where I can! Aug 28, 2018 at 16:43

My WiFi service of nixos 19.09 failed. I tried this, and it worked.

  1. Edit /etc/nixos/configuration.nix like this.

    networking.wireless.enable = false; ##Only one daemon, wireless or networkmanager, could be enabled at the same time. networking.networkmanager.enable = true;

  2. rebuild nixos.

    sudo nixos-rebuild switch --upgrade --show-trace

  3. reboot and start networkmanager service daemon.

    sudo systemctl restart networkmanager

  4. enter wifi passwork with nmcli or nmtui

    sudo nmcli


    sudo nmtui

That is it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .