diff options
author | makefu <github@syntax-fehler.de> | 2017-08-16 12:09:18 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-08-16 12:09:18 +0200 |
commit | 20b7cd80ecdc763c00fa66dc736c85d8c9652e4b (patch) | |
tree | 1ec48726bbead39d89e3b4b9fe53bb086356b20e /makefu | |
parent | f3abf84523e49d03c0d54a06b3551b33190b4b72 (diff) |
ma gum: un-hardcode interface
Diffstat (limited to 'makefu')
-rw-r--r-- | makefu/1systems/gum/config.nix | 24 |
1 files 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 { <stockholm/makefu/2configs/sabnzbd.nix> <stockholm/makefu/2configs/torrent.nix> <stockholm/makefu/2configs/iodined.nix> + <stockholm/makefu/2configs/vpn/openvpn-server.nix> ## Web <stockholm/makefu/2configs/nginx/share-download.nix> @@ -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" ]; |