From 20b7cd80ecdc763c00fa66dc736c85d8c9652e4b Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Aug 2017 12:09:18 +0200 Subject: ma gum: un-hardcode interface --- makefu/1systems/gum/config.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index bbb8cfe11..110edc130 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -9,6 +9,7 @@ let external-gw6 = "fe80::1"; external-netmask = 22; external-netmask6 = 64; + ext-if = "et0"; # gets renamed on the fly internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; main-disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0"; in { @@ -41,6 +42,7 @@ in { + ## Web @@ -94,7 +96,7 @@ in { ]; }; - + makefu.server.primary-itf = ext-if; # access users.users = { @@ -120,7 +122,7 @@ in { # Network services.udev.extraRules = '' - SUBSYSTEM=="net", ATTR{address}=="${external-mac}", NAME="et0" + SUBSYSTEM=="net", ATTR{address}=="${external-mac}", NAME="${ext-if}" ''; boot.kernelParams = [ ]; networking = { @@ -152,14 +154,16 @@ in { 21032 ]; }; - interfaces.et0.ip4 = [{ - address = external-ip; - prefixLength = external-netmask; - }]; - interfaces.et0.ip6 = [{ - address = external-ip6; - prefixLength = external-netmask6; - }]; + interfaces."${ext-if}" = { + ip4 = [{ + address = external-ip; + prefixLength = external-netmask; + }]; + ip6 = [{ + address = external-ip6; + prefixLength = external-netmask6; + }]; + }; defaultGateway6 = external-gw6; defaultGateway = external-gw; nameservers = [ "8.8.8.8" ]; -- cgit v1.2.3