nixos-config/nixos/misc/wifi-multiplex.nix

15 lines
304 B
Nix

{ pkgs, lib, ... }:
let
wifiUdevRule = ''
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", KERNEL!="virt_", RUN+="${pkgs.iw}/bin/iw dev %k interface add virt_%k_ap type station"
'';
in
{
environment.systemPackages = with pkgs; [
iw
];
services.udev.extraRules = wifiUdevRule;
}