From 9549ef1003905588dda476be5c502c051b4bb98d Mon Sep 17 00:00:00 2001 From: magic_rb Date: Sat, 7 Oct 2023 22:49:16 +0200 Subject: [PATCH] Pin interface to specific name in microvm-extras Signed-off-by: magic_rb --- nixos/modules/microvm-extras.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/microvm-extras.nix b/nixos/modules/microvm-extras.nix index 27a180a..c50b7df 100644 --- a/nixos/modules/microvm-extras.nix +++ b/nixos/modules/microvm-extras.nix @@ -336,6 +336,10 @@ in } ]; + services.udev.extraRules = '' + ATTR{address}=="02:00:00:00:${intToHex cfg.groupId}:${intToHex cfg.taskId}", NAME="eth0" + ''; + networking.interfaces."eth0" = { ipv4.addresses = [ {