diff --git a/modules/meta/default.nix b/modules/meta/default.nix index 7e6b864..16d0fd5 100644 --- a/modules/meta/default.nix +++ b/modules/meta/default.nix @@ -38,6 +38,11 @@ default = with profiles; [ base ]; }; + defaultInterface = mkOption { + description = "default interface of the machine"; + default = "ens18"; + }; + }; } ); diff --git a/profiles/vm-simple-network.nix b/profiles/vm-simple-network.nix index 43f0049..75943ab 100644 --- a/profiles/vm-simple-network.nix +++ b/profiles/vm-simple-network.nix @@ -2,7 +2,7 @@ { systemd.network.enable = true; systemd.network.networks."10-wan" = { - matchConfig.Name = "ens18"; + matchConfig.Name = config.machine.meta.defaultInterface; networkConfig = { DHCP = "ipv4"; Address = config.machine.meta.ips.public.ipv6;