diff options
author | makefu <github@syntax-fehler.de> | 2017-07-31 19:29:03 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-07-31 19:29:03 +0200 |
commit | 681042eedf2dbad2f999dec5cf43a018c52f2d7d (patch) | |
tree | 0d96f8e60624f8037a1280834e47a586e71ef403 /tv/1systems | |
parent | adace5302f92fa8e41d7c3d1fde62623328a4633 (diff) | |
parent | 47abe1c1a28eda6d8bb90d49356ded7e0341f1ea (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/1systems')
-rw-r--r-- | tv/1systems/cd/config.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tv/1systems/cd/config.nix b/tv/1systems/cd/config.nix index f78bcafeb..341a62e45 100644 --- a/tv/1systems/cd/config.nix +++ b/tv/1systems/cd/config.nix @@ -1,8 +1,9 @@ -{ config, lib, pkgs, ... }: - with import <stockholm/lib>; +{ config, pkgs, ... }: let + + bestGuessGateway = addr: elemAt (match "(.*)(\.[^.])" addr) 0 + ".1"; -{ +in { krebs.build.host = config.krebs.hosts.cd; imports = [ @@ -13,14 +14,14 @@ with import <stockholm/lib>; <stockholm/tv/2configs/retiolum.nix> ]; - networking = { + networking = let + address = config.krebs.build.host.nets.internet.ip4.addr; + in { + defaultGateway = bestGuessGateway address; interfaces.enp2s1.ip4 = singleton { - address = let - addr = "45.62.237.203"; - in assert config.krebs.build.host.nets.internet.ip4.addr == addr; addr; + inherit address; prefixLength = 24; }; - defaultGateway = "45.62.237.1"; nameservers = ["8.8.8.8"]; }; |