From eff469ebef1d0be6c1096f3871001b583bb71ed1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Oct 2015 19:34:37 +0200 Subject: lass 1 cloudkrebs: get ip from build host --- lass/1systems/cloudkrebs.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lass/1systems/cloudkrebs.nix b/lass/1systems/cloudkrebs.nix index f22e3e045..894362d97 100644 --- a/lass/1systems/cloudkrebs.nix +++ b/lass/1systems/cloudkrebs.nix @@ -1,6 +1,12 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: -{ +let + inherit (import ../4lib { inherit pkgs lib; }) getDefaultGateway; + inherit (lib) head; + + ip = (head config.krebs.build.host.nets.internet.addrs4); + r_ip = (head config.krebs.build.host.nets.retiolum.addrs4); +in { imports = [ ../../tv/2configs/CAC-Developer-2.nix ../../tv/2configs/CAC-CentOS-7-64bit.nix @@ -11,11 +17,11 @@ { networking.interfaces.enp2s1.ip4 = [ { - address = "104.167.113.104"; + address = ip; prefixLength = 24; } ]; - networking.defaultGateway = "104.167.113.1"; + networking.defaultGateway = getDefaultGateway ip; networking.nameservers = [ "8.8.8.8" ]; -- cgit v1.2.3