external: add palo.nix

This commit is contained in:
lassulus 2019-02-02 09:13:53 +01:00
parent 936bf9f7b2
commit e2ae92445c
3 changed files with 82 additions and 13 deletions

View File

@ -16,6 +16,7 @@ with import <stockholm/lib>;
tinc-for = name: builtins.readFile (./tinc + "/${name}.pub"); tinc-for = name: builtins.readFile (./tinc + "/${name}.pub");
in { in {
hosts = mapAttrs hostDefaults { hosts = mapAttrs hostDefaults {
dpdkm = { dpdkm = {
owner = config.krebs.users.Mic92; owner = config.krebs.users.Mic92;
@ -225,17 +226,6 @@ in {
}; };
}; };
}; };
pepe = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.123.4";
tinc.port = 720;
aliases = [ "pepe.r" ];
tinc.pubkey = tinc-for "pepe";
};
};
};
scardanelli = { scardanelli = {
owner = config.krebs.users.kmein; owner = config.krebs.users.kmein;
nets = { nets = {
@ -404,8 +394,6 @@ in {
mail = "joerg@thalheim.io"; mail = "joerg@thalheim.io";
pubkey = ssh-for "Mic92"; pubkey = ssh-for "Mic92";
}; };
palo = {
};
qubasa = { qubasa = {
mail = "luis.nixos@gmail.com"; mail = "luis.nixos@gmail.com";
}; };

81
krebs/3modules/external/palo.nix vendored Normal file
View File

@ -0,0 +1,81 @@
with import <stockholm/lib>;
{ config, ... }: let
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;
} // optionalAttrs (host.nets?wiregrill) {
nets.wiregrill.ip6.addr =
(krebs.genipv6 "wiregrill" "external" { inherit hostName; }).address;
});
ssh-for = name: builtins.readFile (./ssh + "/${name}.pub");
tinc-for = name: builtins.readFile (./tinc + "/${name}.pub");
in {
hosts = mapAttrs hostDefaults {
pepe = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.23.1";
tinc.port = 720;
aliases = [ "pepe.r" ];
tinc.pubkey = tinc-for "palo";
};
};
};
kruck = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.23.3";
tinc.port = 720;
aliases = [ "kruck.r" ];
tinc.pubkey = tinc-for "palo";
};
};
};
schasch = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.23.2";
tinc.port = 720;
aliases = [ "schasch.r" ];
tinc.pubkey = tinc-for "palo";
};
};
};
workhorse = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.23.5";
tinc.port = 720;
aliases = [ "workhorse.r" ];
tinc.pubkey = tinc-for "palo";
};
};
};
workout = {
owner = config.krebs.users.palo;
nets = {
retiolum = {
ip4.addr = "10.243.23.4";
tinc.port = 720;
aliases = [ "workout.r" ];
tinc.pubkey = tinc-for "palo";
};
};
};
};
users = {
palo = {
};
};
}