Skip to content

Commit

Permalink
Add udev rule for Wi-Fi adapter in netvm
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Nikolaenko <[email protected]>
  • Loading branch information
unbel13ver authored and brianmcgillion committed Aug 26, 2024
1 parent 7341044 commit 1e93bd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/microvm/virtualization/microvm/netvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ let

services.openssh = config.ghaf.security.sshKeys.sshAuthorizedKeysCommand;

# WORKAROUND: Create a rule to temporary hardcode device name for Wi-Fi adapter
services.udev.extraRules = ''
SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x${(lib.head config.ghaf.hardware.definition.network.pciDevices).vendorId}", ATTRS{device}=="0x${(lib.head config.ghaf.hardware.definition.network.pciDevices).productId}", NAME="${(lib.head config.ghaf.hardware.definition.network.pciDevices).name}"
'';

microvm = {
optimize.enable = true;
hypervisor = "qemu";
Expand Down

0 comments on commit 1e93bd8

Please sign in to comment.