qemu: use service-based-module for network interfaces

This commit is contained in:
Daniel Barlow 2023-08-31 23:50:42 +01:00
parent e04ec2e959
commit 92970e8ed0

View file

@ -48,19 +48,20 @@
drivers = ["mac80211_hwsim"]; drivers = ["mac80211_hwsim"];
klibBuild = config.system.outputs.kernel.modulesupport; klibBuild = config.system.outputs.kernel.modulesupport;
}; };
inherit (pkgs.liminix.networking) interface;
in { in {
defaultOutput = "vmroot"; defaultOutput = "vmroot";
flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh
networkInterfaces = { networkInterfaces =
lan = interface { device = "eth0"; }; let inherit (config.system.service.network) link;
wan = interface { device = "eth1"; }; in {
lan = link.build { ifname = "eth0"; };
wan = link.build { ifname = "eth1"; };
wlan_24 = interface { wlan_24 = link.build {
device = "wlan0"; ifname = "wlan0";
dependencies = [ mac80211 ]; dependencies = [ mac80211 ];
};
}; };
};
}; };
}; };