hosts.*.net.retiolum.ip6.addr: use genipv6

This commit is contained in:
tv 2018-12-11 21:41:11 +01:00
parent 46275b41ed
commit 313712ebc2
6 changed files with 70 additions and 118 deletions

View file

@ -1,19 +1,22 @@
{ config, ... }:
with import <stockholm/lib>;
{ config, ... }: let
{
hosts = mapAttrs (_: recursiveUpdate {
hostDefaults = hostName: host: flip recursiveUpdate host ({
ci = false;
external = true;
monitoring = false;
}) {
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "external" { inherit hostName; }).address;
});
in {
hosts = mapAttrs hostDefaults {
sokrateslaptop = {
owner = config.krebs.users.sokratess;
nets = {
retiolum = {
ip4.addr = "10.243.142.104";
ip6.addr = "42:f8a1:044d:0f75:9d73:56d8:f432:c6cc";
aliases = [
"sokrateslaptop.r"
];
@ -35,7 +38,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.29.201";
ip6.addr = "42:4234:6a6d:600::1";
aliases = [
"kruck.r"
];
@ -62,7 +64,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.2.2";
ip6.addr = "42:2:5ca:da:3111::1";
aliases = [
"scardanelli.r"
];
@ -90,7 +91,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.2.1";
ip6.addr = "42:2::0:3:05::1";
aliases = [
"homeros.r"
];
@ -118,7 +118,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.29.168";
ip6.addr = "42:4992:6a6d:600::1";
aliases = [
"turingmachine.r"
];
@ -148,14 +147,13 @@ with import <stockholm/lib>;
ip4.addr = "129.215.197.11";
aliases = [ "eddie.i" ];
};
retiolum = rec {
retiolum = {
via = internet;
addrs = [
ip4.addr
ip6.addr
config.krebs.hosts.eddie.nets.retiolum.ip4.addr
config.krebs.hosts.eddie.nets.retiolum.ip6.addr
];
ip4.addr = "10.243.29.170";
ip6.addr = "42:4992:6a6d:700::1";
aliases = [ "eddie.r" ];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
@ -184,7 +182,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.29.171";
ip6.addr = "42:4992:6a6d:700::2";
aliases = [ "rock.r" ];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
@ -214,7 +211,6 @@ with import <stockholm/lib>;
retiolum = {
via = internet;
ip4.addr = "10.243.29.172";
ip6.addr = "42:4992:6a6d:800::1";
aliases = [ "inspector.r" ];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
@ -239,7 +235,6 @@ with import <stockholm/lib>;
nets = rec {
retiolum = {
ip4.addr = "10.243.29.173";
ip6.addr = "42:4992:6a6d:900::1";
aliases = [ "dpdkm.r" ];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
@ -268,14 +263,13 @@ with import <stockholm/lib>;
ip6.addr = "2a03:4000:13:31e::1";
aliases = [ "eve.i" ];
};
retiolum = rec {
retiolum = {
via = internet;
addrs = [
ip4.addr
ip6.addr
config.krebs.hosts.eve.nets.retiolum.ip4.addr
config.krebs.hosts.eve.nets.retiolum.ip6.addr
];
ip4.addr = "10.243.29.174";
ip6.addr = "42:4992:6a6d:a00::1";
aliases = [ "eve.r" ];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----

View file

@ -1,17 +1,20 @@
{ config, ... }:
with import <stockholm/lib>;
{ config, ... }: let
{
hosts = mapAttrs (_: recursiveUpdate {
owner = config.krebs.users.jeschli;
hostDefaults = hostName: host: flip recursiveUpdate host ({
ci = true;
}) {
owner = config.krebs.users.jeschli;
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "jeschli" { inherit hostName; }).address;
});
in {
hosts = mapAttrs hostDefaults {
brauerei = {
nets = {
retiolum = {
ip4.addr = "10.243.27.29";
ip6.addr = "42::29";
aliases = [
"brauerei.r"
];
@ -48,7 +51,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.27.27";
ip6.addr = "42::27";
aliases = [
"reagenzglas.r"
];
@ -92,7 +94,6 @@ with import <stockholm/lib>;
retiolum = {
via = internet;
ip4.addr = "10.243.27.30";
ip6.addr = "42::30";
aliases = [
"enklave.r"
"cgit.enklave.r"
@ -131,7 +132,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.27.31";
ip6.addr = "42::31";
aliases = [
"bolide.r"
];

View file

@ -1,20 +1,24 @@
{ config, ... }:
with import <stockholm/lib>;
let
{ config, ... }: let
hostDefaults = hostName: host: flip recursiveUpdate host ({
owner = config.krebs.users.krebs;
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "krebs" { inherit hostName; }).address;
});
testHosts = genAttrs [
"test-arch"
"test-centos6"
"test-centos7"
"test-all-krebs-modules"
] (name: {
owner = config.krebs.users.krebs;
inherit name;
cores = 1;
nets = {
retiolum = {
ip4.addr = "10.243.73.57";
ip6.addr = "42:0:0:0:0:0:0:7357";
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAy41YKF/wpHLnN370MSdnAo63QUW30aw+6O79cnaJyxoL6ZQkk4Nd
@ -29,14 +33,12 @@ let
};
});
in {
hosts = {
hosts = mapAttrs hostDefaults {
hotdog = {
ci = true;
owner = config.krebs.users.krebs;
nets = {
retiolum = {
ip4.addr = "10.243.77.3";
ip6.addr = "42:0:0:0:0:0:77:3";
aliases = [
"hotdog.r"
"build.r"
@ -61,11 +63,9 @@ in {
};
onebutton = {
cores = 1;
owner = config.krebs.users.krebs;
nets = {
retiolum = {
ip4.addr = "10.243.0.101";
ip6.addr = "42:0:0:0:0:0:0:101";
aliases = [
"onebutton.r"
];
@ -92,11 +92,9 @@ in {
};
puyak = {
ci = true;
owner = config.krebs.users.krebs;
nets = {
retiolum = {
ip4.addr = "10.243.77.2";
ip6.addr = "42:0:0:0:0:0:77:2";
aliases = [
"puyak.r"
"build.puyak.r"
@ -120,7 +118,6 @@ in {
};
wolf = {
ci = true;
owner = config.krebs.users.krebs;
nets = {
shack = {
ip4.addr = "10.42.2.150" ;
@ -135,7 +132,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.77.1";
ip6.addr = "42:0:0:0:0:0:77:1";
aliases = [
"wolf.r"
"build.wolf.r"

View file

@ -1,20 +1,22 @@
{ config, ... }:
with import <stockholm/lib>;
let
{ config, ... }: let
hostDefaults = hostName: host: flip recursiveUpdate host ({
ci = true;
monitoring = true;
owner = config.krebs.users.lass;
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "lass" { inherit hostName; }).address;
});
rip6 = krebs.genipv6 "retiolum" "lass";
wip6 = krebs.genipv6 "wirelum" "lass";
in
{
in {
dns.providers = {
"lassul.us" = "zones";
};
hosts = mapAttrs (_: recursiveUpdate {
owner = config.krebs.users.lass;
ci = true;
monitoring = true;
}) {
hosts = mapAttrs hostDefaults {
prism = rec {
cores = 4;
extraZones = {
@ -54,7 +56,6 @@ in
retiolum = {
via = internet;
ip4.addr = "10.243.0.103";
ip6.addr = "42:0000:0000:0000:0000:0000:0000:15ab";
aliases = [
"prism.r"
"cache.prism.r"
@ -118,7 +119,6 @@ in
retiolum = {
via = internet;
ip4.addr = "10.243.0.123";
ip6.addr = "42:0:0:0:0:0:0:123";
aliases = [
"archprism.r"
];
@ -150,7 +150,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.81.176";
ip6.addr = "42:dc25:60cf:94ef:759b:d2b6:98a9:2e56";
aliases = [
"uriel.r"
"cgit.uriel.r"
@ -176,7 +175,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.2";
ip6.addr = "42:0:0:0:0:0:0:dea7";
aliases = [
"mors.r"
"cgit.mors.r"
@ -209,7 +207,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.4";
ip6.addr = "42:0:0:0:0:0:0:50d4";
aliases = [
"shodan.r"
"cgit.shodan.r"
@ -242,7 +239,6 @@ in
nets = rec {
retiolum = {
ip4.addr = "10.243.133.114";
ip6.addr = "42:0:0:0:0:0:01ca:1205";
aliases = [
"icarus.r"
"cgit.icarus.r"
@ -275,7 +271,6 @@ in
nets = rec {
retiolum = {
ip4.addr = "10.243.133.115";
ip6.addr = "42:0:0:0:0:0:daed:a105";
aliases = [
"daedalus.r"
"cgit.daedalus.r"
@ -301,7 +296,6 @@ in
nets = rec {
retiolum = {
ip4.addr = "10.243.133.116";
ip6.addr = "42:0:0:0:0:0:0:1101";
aliases = [
"skynet.r"
"cgit.skynet.r"
@ -327,7 +321,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.133.77";
ip6.addr = "42:0:0:0:0:0:717:7137";
aliases = [
"littleT.r"
];
@ -368,7 +361,6 @@ in
nets = rec {
retiolum = {
ip4.addr = "10.243.1.3";
ip6.addr = "42::1:3";
aliases = [
"xerxes.r"
];
@ -410,7 +402,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.13";
ip6.addr = "42:0:0:0:0:0:0:12ed";
aliases = [
"red.r"
];
@ -440,7 +431,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.14";
ip6.addr = "42:0:0:0:0:0:0:14";
aliases = [
"yellow.r"
];
@ -477,7 +467,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.77";
ip6.addr = "42:0:0:0:0:0:0:77";
aliases = [
"blue.r"
];
@ -521,7 +510,6 @@ in
nets = {
retiolum = {
ip4.addr = "10.243.0.19";
ip6.addr = "42::19";
aliases = [
"morpheus.r"
];

View file

@ -1,20 +1,27 @@
{ config, ... }:
with import <stockholm/lib>;
## generate keys with:
# tinc generate-keys
# ssh-keygen -f ssh.id_ed25519 -t ed25519 -C host
let
with import <stockholm/lib>;
{ config, ... }: let
hostDefaults = hostName: host: flip recursiveUpdate host ({
owner = config.krebs.users.makefu;
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "makefu" { inherit hostName; }).address;
});
pub-for = name: builtins.readFile (./ssh + "/${name}.pub");
in {
hosts = mapAttrs (_: setAttr "owner" config.krebs.users.makefu) {
hosts = mapAttrs hostDefaults {
cake = rec {
cores = 4;
ci = false;
nets = {
retiolum = {
ip4.addr = "10.243.136.236";
ip6.addr = "42:b3b2:9552:eef0:ee67:f3b3:8d33:eee1";
aliases = [
"cake.r"
];
@ -39,7 +46,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.136.237";
ip6.addr = "42:b3b2:9552:eef0:ee67:f3b3:8d33:eee2";
aliases = [
"crapi.r"
];
@ -65,7 +71,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.177.9";
ip6.addr = "42:f63:ddf8:7520:cfec:9b61:d807:1dce";
aliases = [
"drop.r"
];
@ -90,7 +95,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.227.163";
ip6.addr = "42:e23f:ae0e:ea25:72ff:4ab8:9bd9:38a6";
aliases = [
"studio.r"
];
@ -116,7 +120,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.113.98";
# ip6.addr = "42:5cf1:e7f2:3fd:cd4c:a1ee:ec71:7096";
aliases = [
"fileleech.r"
];
@ -147,7 +150,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.80.249";
ip6.addr = "42:ecb0:376:b37d:cf47:1ecf:f32b:a3b9";
aliases = [
"latte.r"
];
@ -171,7 +173,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.0.210";
ip6.addr = "42:f9f1:0000:0000:0000:0000:0000:0001";
aliases = [
"pnp.r"
"cgit.pnp.r"
@ -195,7 +196,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.0.84";
ip6.addr = "42:ff6b:5f0b:460d:2cee:4d05:73f7:5566";
aliases = [
"darth.r"
];
@ -267,7 +267,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.0.212";
ip6.addr = "42:f9f1:0000:0000:0000:0000:0000:0002";
aliases = [
"tsp.r"
];
@ -295,7 +294,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.0.91";
ip6.addr = "42:0b2c:d90e:e717:03dc:9ac1:7c30:a4db";
aliases = [
"x.r"
];
@ -329,7 +327,6 @@ in {
'';
};
#wiregrill = {
# ip6.addr = "42:4200:0000:0000:0000:0000:0000:a4db";
# aliases = [
# "x.w"
# ];
@ -347,7 +344,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.1.91";
ip6.addr = "42:0b2c:d90e:e717:03dd:9ac1:0000:a400";
aliases = [
"vbob.r"
];
@ -386,7 +382,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.0.153";
ip6.addr = "42:9143:b4c0:f981:6030:7aa2:8bc5:4110";
aliases = [
"pigstarter.r"
];
@ -422,7 +417,6 @@ in {
retiolum = {
via = internet;
ip4.addr = "10.243.29.169";
ip6.addr = "42:6e1e:cc8a:7cef:827:f938:8c64:baad";
aliases = [
"wry.r"
"graph.wry.r"
@ -460,7 +454,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.153.102";
ip6.addr = "42:4b0b:d990:55ba:8da8:630f:dc0e:aae0";
aliases = [
"filepimp.r"
];
@ -491,7 +484,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.0.89";
ip6.addr = "42:f9f0::10";
aliases = [
"omo.r"
"dcpp.omo.r"
@ -536,7 +528,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.214.15";
# ip6.addr = "42:5a02:2c30:c1b1:3f2e:7c19:2496:a732";
aliases = [
"wbob.r"
"hydra.wbob.r"
@ -596,7 +587,6 @@ in {
};
#wiregrill = {
# via = internet;
# ip6.addr = "42:4200:0000:0000:0000:0000:0000:70d3";
# aliases = [
# "gum.w"
# ];
@ -605,7 +595,6 @@ in {
retiolum = {
via = internet;
ip4.addr = "10.243.0.213";
ip6.addr = "42:f9f0:0000:0000:0000:0000:0000:70d3";
aliases = [
"nextgum.r"
"graph.r"
@ -673,7 +662,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.205.131";
ip6.addr = "42:490d:cd82:d2bb:56d5:abd1:b88b:e8b4";
aliases = [
"shoney.r"
];
@ -698,7 +686,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.83.237";
ip6.addr = "42:af50:99cf:c185:f1a8:14d5:acb:8101";
aliases = [
"sdev.r"
];
@ -736,7 +723,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.211.172";
ip6.addr = "42:472a:3d01:bbe4:4425:567e:592b:065d";
aliases = [
"flap.r"
];
@ -759,7 +745,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.231.219";
ip6.addr = "42:f7bf:178d:4b68:1c1b:42e8:6b27:6a72";
aliases = [
"nukular.r"
];
@ -782,7 +767,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.124.21";
ip6.addr = "42:9898:a8be:ce56:0ee3:b99c:42c5:109e";
aliases = [
"heidi.r"
];
@ -872,7 +856,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.189.130";
ip6.addr = "42:c64e:011f:9755:31e1:c3e6:73c0:af2d";
aliases = [
"filebitch.r"
];
@ -895,7 +878,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.26.29";
ip6.addr = "42:927a:3d59:1cb3:29d6:1a08:78d3:812e";
aliases = [
"excobridge.r"
];
@ -918,7 +900,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.226.213";
ip6.addr = "42:432e:2379:0cd2:8486:f3b5:335a:5d83";
aliases = [
"horisa.r"
];
@ -947,7 +928,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.57.85";
ip6.addr = "42:2f06:b899:a3b5:1dcf:51a4:a02b:8731";
aliases = [
"wooki.r"
];
@ -970,7 +950,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.0.163";
ip6.addr = "42:b67b:5752:a730:5f28:d80d:6b37:5bda";
aliases = [
"senderechner.r"
];
@ -995,7 +974,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.144.142";
ip6.addr = "42:4bf8:94b:eec5:69e2:c837:686e:f278";
aliases = [
"tcac-0-1.r"
];
@ -1025,7 +1003,6 @@ in {
};
retiolum = {
ip4.addr = "10.243.139.184";
ip6.addr = "42:d568:6106:ba30:753b:0f2a:8225:b1fb";
aliases = [
"muhbaasu.r"
];
@ -1048,7 +1025,6 @@ in {
nets = {
retiolum = {
ip4.addr = "10.243.183.236";
ip6.addr = "42:8ca8:d2e4:adf6:5c0f:38cb:e9ef:eb3c";
aliases = [
"tpsw.r"
];

View file

@ -1,19 +1,24 @@
{ config, ... }:
with import <stockholm/lib>;
{ config, ... }: let
{
hostDefaults = hostName: host: flip recursiveUpdate host ({
owner = config.krebs.users.tv;
} // optionalAttrs (host.nets?retiolum) {
nets.retiolum.ip6.addr =
(krebs.genipv6 "retiolum" "tv" { inherit hostName; }).address;
});
in {
dns.providers = {
"viljetic.de" = "regfish";
};
hosts = mapAttrs (_: setAttr "owner" config.krebs.users.tv) {
hosts = mapAttrs hostDefaults {
alnus = {
ci = true;
cores = 2;
nets = {
retiolum = {
ip4.addr = "10.243.21.1";
ip6.addr = "42::2101";
aliases = [
"alnus.r"
];
@ -38,7 +43,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.20.1";
ip6.addr = "42::2001";
aliases = [
"mu.r"
];
@ -79,7 +83,6 @@ with import <stockholm/lib>;
retiolum = {
via = config.krebs.hosts.ni.nets.internet;
ip4.addr = "10.243.113.223";
ip6.addr = "42:4522:25f8:36bb:8ccb:150:231a:2af4";
aliases = [
"ni.r"
"cgit.ni.r"
@ -114,7 +117,6 @@ with import <stockholm/lib>;
};
retiolum = {
ip4.addr = "10.243.0.110";
ip6.addr = "42:2d5:733f:d6da:c0f5:2bb7:2b18:9ec";
aliases = [
"nomic.r"
"cgit.nomic.r"
@ -158,7 +160,6 @@ with import <stockholm/lib>;
};
retiolum = {
ip4.addr = "10.243.13.37";
ip6.addr = "42::1337";
aliases = [
"wu.r"
"cgit.wu.r"
@ -185,7 +186,6 @@ with import <stockholm/lib>;
nets = {
retiolum = {
ip4.addr = "10.243.22.22";
ip6.addr = "42::2222";
aliases = [
"querel.r"
];
@ -226,7 +226,6 @@ with import <stockholm/lib>;
};
retiolum = {
ip4.addr = "10.243.13.38";
ip6.addr = "42::1338";
aliases = [
"xu.r"
"cgit.xu.r"
@ -261,7 +260,6 @@ with import <stockholm/lib>;
};
retiolum = {
ip4.addr = "10.243.13.40";
ip6.addr = "42::1340";
aliases = [
"zu.r"
];