How to disable Wifi?

Nixos-rebuild fails with kernel 6.14 on nixos-24.11 because wb-broadcom-sta-6.30 cannot be build, cf. Nixos-rebuild fails on nixos-24.11
So I am still using Kernel 6.13.

The package description NixOS Search says that wb-broadcom-sta-6.30 is needed for some Broadcom’s wireless cards.

Since my desktop is connected using an Ethernet Cable.
Would it thus not help do disable Wireless completely?
I hope that the module will not be needed and its build not attempted.

How can I define not to use any wifi/wireless network?

Voilà part of my configuration:

  networking = {
    hostName = prop.hostName;
    # Enable networking
    networkmanager = {
      dns = "systemd-resolved";
      enable = true;
      wifi.powersave = false;
    };
  };

Thanks for your help.

You could use vfio-pci stub which would effectively make it unavailable. It may depend on virtualisation but I don’t think so.

You will need to find the device;

$ lspci -nn
2d:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz [8086:2725] (rev 1a)

And then override the driver by using two of the details from the previous command.

  1. 2d:00.0 (0000:2d:00.0)
  2. 8086:2725
{ config, lib, pkgs, ... }:

let

in

{
 boot = {
  extraModprobeConfig = ''
   options vfio-pci ids=8086:2725
  '';
  initrd = {
   availableKernelModules = [
    "vfio-pci"
   ];
   preDeviceCommands = ''
    echo "vfio-pci" > /sys/bus/pci/devices/0000:2d:00.0/driver_override
    modprobe -i vfio-pci
   '';
  };
 };
}