mirror of
https://github.com/oddlama/nixos-extra-modules.git
synced 2025-10-11 06:10:39 +02:00
feat: allow changing interface name in VM
This commit is contained in:
parent
6a4736e077
commit
2502ff50ab
2 changed files with 27 additions and 15 deletions
|
@ -47,12 +47,16 @@ in {
|
|||
|
||||
# MACVTAP bridge to the host's network
|
||||
interfaces = flip mapAttrsToList guestCfg.microvm.interfaces (
|
||||
interface: {mac, ...}: {
|
||||
_: {
|
||||
mac,
|
||||
hostLink,
|
||||
...
|
||||
}: {
|
||||
type = "macvtap";
|
||||
id = "vm-${replaceStrings [":"] [""] mac}";
|
||||
inherit mac;
|
||||
macvtap = {
|
||||
link = interface;
|
||||
link = hostLink;
|
||||
mode = "bridge";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue