summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-10-03 19:34:37 +0200
committerlassulus <lass@aidsballs.de>2015-10-04 13:33:02 +0200
commiteff469ebef1d0be6c1096f3871001b583bb71ed1 (patch)
tree03b29a9a3573d463807d7b900dce18e01f847bba
parent161c81e54e96bb99036624e5cf9aeaa20a1fad0b (diff)
lass 1 cloudkrebs: get ip from build host
-rw-r--r--lass/1systems/cloudkrebs.nix14
1 files 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"
];