No network devices available on fresh NixOS install

I am completely new to NixOS and Linux in general and switched from Windows 11 on my laptop. I installed NixOS (XFCE) from a live USB using the graphical installer, and WiFi does not work inside the installer or in the installed OS. With an unaltered (after graphical installation) configuration.nix the network menu in the top right on XFCE says “No network devices available” [see image below]. This is with networking.networkmanager.enable = true and networking.wireless.enable = false

I tried setting networking.wireless.enable = true and networking.networkmanager.enable = false instead and rebuilding with sudo nixos-rebuild switch but that returned an error [see image below].

Next, I looked in the NixOS manual about Networking and saw something about having to set programs.nm-applet.enable = true if using XFCE (which I am). I set it in configuration.nix, rebuilt, and rebooted and the result was the following [see image below]:

The problem is still there and I am clueless on what to do next. An additional (maybe related) problem I am having is that my system fails to boot into NixOS maybe 50% of the time, freezing on either a black screen or where it says “reached target Graphical Interface”. Any help is appreciated.

What hardware are you using and what wireless card is it?

are you seeing any wireless interfaces with

ifconfig

or if you new skool

ip link

and

nmcli can be quite funky too. However when posting diagnostic info that contains public ip address or hardware mac address… you may want to edit them for privacy reasons.

journalctl -r | grep iwlwifi , i got a intel card, so with you should see activity and if the driver is being loaded at all.

lspci and lsusb can be good at identifying what make and model of wireless card you have.

you have past the first test getting nixos installed, the second test will be wifi. Stick with it, you may be incurring pain right now, but if everything worked, you would not learning anything…

linux doesn’t lack a whole boat load of diagnostic commands to de-abstract from the hardware of your machine. yes, i did say your machine, as many companies think it’s ‘their machine’, but that’s another can of worms entirely :wink:

https://www.cyberciti.biz/faq/linux-list-network-cards-command/

bear in mind, some of these tools wont be available on your fresh configuration, so you may need to something like

`nix-shell -p lshw

and then execute

lshw
`

don’t fear the command line, it will set you free. Go and have some fun… :slight_smile: .

Welcome to Unix / Nix/OS .

lets see what machine you have, ACPI sometimes is a problem , there a whole load of workaround in GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks. for various cursed hardware…

i’m not sure you have used git before, but it’s a great place to store you configuration.nix, and share it with others, but if you’re not a git master just yet…don’t worry.

does your laptop have a physical ethernet port, if it does, then that can get you connected to start playing with stuff, usually ethernet adapters work without much fuss these days. Some laptop wifi cards are cursed, have no or bad driver support. I’ve even resorted to buying a usb wifi dongle for laptop with really really bad linux support, or chipsets that are so radio noisy, that they resemble a leaky microwave oven, than an clean OFDM wave.

i’ve not use xfce myself recently, it could be a problem between that and the wireless subsystem, try gnome or kde to start of with, and see if you get better results. Nix/OS allows you to chop and change between enviroments, which would probably be certain doom on other linux systems…but do what you want, you can’t break it, you can always roll back…

just start to tinker…

Where are you located on earth?

Hi, thank you for replying. I am in Sweden.

Exact model of laptop is Lenovo Ideapad 5-14 82LM00HNMX. Unsure what wireless card I have since both commands lspci and lsusb cannot be found. CPU is AMD Ryzen 7 5700U. ip link returns this loopback device:

Laptop does not have an ethernet port, but I can connect to internet by tethering my phone to my laptop.

journalctl -r | grep iwlwifi returns nothing. Not sure what to look for in lshw

Googling on the model I found that my laptop’s wifi card is (Wi-Fi 6(802.11ax)). I don’t think that helps

Switched to GNOME by editing configuration.nix. Wifi is not found there either. Also tried KDE Plasma, same problem

1 Like

You can run nix-shell -p pciutils then lspci -k inside the nix-shell.

sample output you want to find.

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
	Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
	Kernel driver in use: r8169
	Kernel modules: r8169


1 Like

You either need firmware for the wireless card that doesn’t ship with the installer image or you need an out-of-tree driver for said wireless card.

By far the easiest option to get going is if you can borrow/buy a USB ethernet dongle and use that for the install. Once you’re up and running it’s a lot easier adding in the bits of configuration required for the wireless card to work.

Check journalctl -b -k to see if there are any errors related to a network card.

If this is your first foray into Linux, please be ready for a significant number of new things to learn and wrap your head around.

Lastly, XFCE, GNOME and KDE are all desktop environments which do not affect hardware support in any way.

2 Likes

maybe you can find a nixer in sweden to pop in to cafe and help you install it.

seems like this model is super new…

and has a snazzy new wifi 6 card in it.

you may find this thread interesting.

fun fact.

Richard Stallman , the creator of the GNU project, has never installed GNU/Linux himself onto hardware…

true story.

Or teather the wifi from your cell phone!

Thank you. I ran these commands and found this:

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8852
	DeviceName: Realtek RTL8111E Ethernet L0M
	Subsystem: Lenovo Device 4852

It shows no driver in use like on other devices. Is that the problem? Any idea what to do from here?

I’m sorry, i didn’t make it clear but you should not look exactly for the Ethernet one. Try findind the wireless/wifi one. Also, since your notebook has newish hardware, you may want to use the latest kernel, not sure if nix backports drivers.

I never saw any other devices related to network. BUT, I upgraded the kernel like you suggested and now I have WiFi. Thank you! It seems to have added a driver for that network controller I found. This is what it says now:

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8852
    DeviceName: Realtek RTL8111E Ethernet L0M
    Subsystem: Lenovo Device 4852
    Kernel driver in use: rtw89_8852ae
    Kernel modules: rtw89_8852ae

Embarrassing that the solution was so simple… I guess that’s what happens when you’re a beginner

2 Likes

please mark it as a solution, perhaps edit you post to make it bit more concise listing your laptop and wireless card , and what kernel are you are now running.

This is why we nix.

1 Like