NixOS deactivates wifi hard blocked when in docking station

Hello,
I installed a fresh NixOS on LVM on a L490i7 connected to a Lenovo Pro Dock.

If the Laptop is connected to the docking station the wifi card is hard blocked (disconnected). Is this the NixOS default and is there a way to activate the wifi card even in the dock with wired connection?

I’m curious to know how you determined that the wifi card was hard blocked, and network manager did not, say, favor a wired Ethernet connection over a wifi connection. What does the networking attrset of your configuration contain? Did the laptop have the same behavior on other OSs?

wifi if crossed in the applet and blocked yes in rfkill list

on Ubuntu it runs fine (without to change networking configs)

rfkill list should tell you if it’s a hardware or software block. To be sure, is it a software block? I agree that this is unexpected, especially because I have not run into this behavior before. For reference, my old Dell E6430 with a dock did not have this behavior on 19.03 (I have since retired the laptop). Care to share your networking attrset? maybe something there could help determine the issue.

Hello theotherjimmy,

I have not saved the config of that time.

  • currently I’m changing too much to do everything isolated … (I cannot switch which in the docking station … and the reboot takes minutes [before is was seconds] but I tries to redo lost of changes without effect … )

rfkill list

0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: yes
        Hard blocked: no
1: tpacpi_wwan_sw: Wireless WAN
        Soft blocked: yes
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: yes

that only the current version.

  networking= {
    hostName = hostnamePC ; 

    networkmanager = {
      enable = true; ## only or wireless.enable = true;
      packages = [ pkgs.networkmanagerapplet ];
    };

    useDHCP = false;
    interfaces = {
      docker0.useDHCP = true;
      virbr0.useDHCP = true;
      virbr0-nic.useDHCP = true;
      #wlp6s0.useDHCP = true;
      enp0s31f6.useDHCP = true;
  	  wlp5s0.useDHCP = true;
  	  wwp0s20f0u9.useDHCP = true;
    };
    };

Now I have to see if the reties of DHCP come up again → because only in the docking station when wifi is blocked the issue appears (for now).

I think networking.networkmanager and networking.interfaces.<name>.useDHCP might cause conflicts. From what I gather, the dhcpcd module (https://github.com/NixOS/nixpkgs/blob/e1e044e70eba8c624b7eb1e54eab08c6ee4f55dd/nixos/modules/services/networking/dhcpcd.nix) uses the networking.interfaces.<name>.useDHCP config, and it has a similar affect to networking.useDHCP except that it configures dhcpcd to only affect those interfaces. If any of those interfaces are also managed by networkmanager, you may run into trouble.

1 Like

thnaks, I have to rethink what I have done.