2023-06-10 10:50:53 +00:00
|
|
|
{ config, lib, ... }:
|
2022-11-08 21:04:39 +00:00
|
|
|
let
|
2023-06-10 10:50:53 +00:00
|
|
|
inherit (lib) flip mapAttrs optionalAttrs recursiveUpdate;
|
|
|
|
slib = import ../../lib/pure.nix { inherit lib; };
|
|
|
|
|
2022-11-08 21:04:39 +00:00
|
|
|
hostDefaults = hostName: host: flip recursiveUpdate host ({
|
|
|
|
ci = false;
|
|
|
|
external = true;
|
|
|
|
monitoring = false;
|
|
|
|
owner = config.krebs.users.rtunreal;
|
|
|
|
} // optionalAttrs (host.nets?retiolum) {
|
|
|
|
nets.retiolum = {
|
2023-06-10 10:50:53 +00:00
|
|
|
ip6.addr = (slib.krebs.genipv6 "retiolum" "external" { inherit hostName; }).address;
|
2022-11-08 21:04:39 +00:00
|
|
|
};
|
|
|
|
} // optionalAttrs (host.nets?wiregrill) {
|
|
|
|
nets.wiregrill = {
|
2023-06-10 10:50:53 +00:00
|
|
|
ip6.addr = (slib.krebs.genipv6 "wiregrill" "external" { inherit hostName; }).address;
|
2022-11-08 21:04:39 +00:00
|
|
|
};
|
|
|
|
});
|
2022-12-17 14:32:53 +00:00
|
|
|
ssh-for = name: builtins.readFile (./ssh + "/${name}.pub");
|
2022-11-08 21:04:39 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
users = rec {
|
2022-12-17 14:32:53 +00:00
|
|
|
rtunreal = rtunreal-spinner;
|
|
|
|
rtunreal-spinner = {
|
|
|
|
mail = "unreal@rtinf.net";
|
|
|
|
pubkey = ssh-for "rtunreal.spinner";
|
|
|
|
};
|
|
|
|
rtunreal-runner = {
|
|
|
|
inherit (rtunreal-spinner) mail;
|
|
|
|
pubkey = ssh-for "rtunreal.runner";
|
2022-11-08 21:04:39 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
hosts = mapAttrs hostDefaults {
|
|
|
|
rtspinner = {
|
|
|
|
nets.retiolum = {
|
|
|
|
aliases = [ "spinner.rtunreal.r" ];
|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
|
|
aliases = [ "runner.rtunreal.r" ];
|
|
|
|
ip4.addr = "10.243.20.22";
|
|
|
|
tinc.pubkey = ''
|
|
|
|
-----BEGIN RSA PUBLIC KEY-----
|
|
|
|
MIICCgKCAgEAwWSzslk21TbghFsEWk+A0FobqgxrYyyimzSw772OhIpDmCLd63Vr
|
|
|
|
x1A/ytEObngMgv/YDTZrp23uFo9uFipAIZPBFBPDPi3fa8OuaGY6MFP6961Ui30l
|
|
|
|
4cHBfhuokfdDZxaARwsUtk3RgvFjQvF//Wgj6MIMg3lBMxr00/U3bhegkhP2NyT6
|
|
|
|
NCB9xbM6iJQyzOum49u0NHXUEkDzpHWm85CcyV4UTv+MQEnXU4l2irYFu+ArTPEn
|
|
|
|
dHqbKBd8lPuLTH1ehiOTh85qC/KV36jHWwmguR96aVEplrFMgV43VnpJj5jLa1NQ
|
|
|
|
n00JiCkCVf89LkAz4ZXtQ+5cvDRSWQGYql+J3KJ28YynLPOIlVlEJ+HjhaSQT/3O
|
|
|
|
qiREOjp2KPpnSoY5561J2LfmL+shpsVzyFxO+2P0K2bE5K66LfTfmoLUiHKq4/SR
|
|
|
|
8EPBZfwvMyWbL3vxngFhZKI01LMsf0YJxu9FWCOPa2X6B7JAxr1jMn0Uzw3ZvNnq
|
|
|
|
q6QK/sJhuM1/ddmCMofKYeOtfdunnboniFzI2QValuIdmlOi7nYNqy+gSrxRSWnJ
|
|
|
|
PTzGoJB9R4/PufSGJxUr7FCRxSY/TN7fJF74YVG9iVz2ttEuwdUI3ORQVrORbpEI
|
|
|
|
wEtM64cb0Dt2WyB3Sit8UGtK59BPYJcU7PB+tMnNLynPzFdkj8gDZtsCAwEAAQ==
|
|
|
|
-----END RSA PUBLIC KEY-----
|
|
|
|
'';
|
|
|
|
tinc.pubkey_ed25519 = "YJE4KD9PhDjxucDAGrbec5Yqqf3A8/VU0J0NV8EPXuN";
|
|
|
|
};
|
|
|
|
};
|
2023-04-11 18:38:09 +00:00
|
|
|
rtgraphene = {
|
|
|
|
nets.wiregrill = {
|
|
|
|
aliases = [ "graphene.rtunreal.w" ];
|
2023-04-11 20:15:42 +00:00
|
|
|
ip4.addr = "10.244.20.20";
|
2023-04-11 18:38:09 +00:00
|
|
|
wireguard.pubkey = "IZ7tnD5ZVqO886hFzk6k92R70p1J6jYvyIEAWUccehU=";
|
|
|
|
};
|
|
|
|
};
|
2022-11-08 21:04:39 +00:00
|
|
|
};
|
|
|
|
}
|