2021-03-19 01:11:37 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
{ depot, lib, pkgs, rebuilder, config, ... }:
|
|
|
|
let
|
|
|
|
inherit (depot.ops) secrets;
|
2021-07-01 01:48:12 +00:00
|
|
|
machineSecrets = secrets.machineSpecific.frantech-nyc01;
|
2021-03-19 01:11:37 +00:00
|
|
|
in {
|
|
|
|
imports = [
|
2022-01-08 21:49:09 +00:00
|
|
|
../lib/frantech.nix
|
2021-07-01 01:48:12 +00:00
|
|
|
../lib/bgp.nix
|
2021-03-19 01:11:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
networking = {
|
2021-03-28 00:34:36 +00:00
|
|
|
hostName = "frantech-nyc01";
|
2021-03-19 01:11:37 +00:00
|
|
|
hostId = "251837df";
|
|
|
|
|
2022-01-08 21:49:09 +00:00
|
|
|
defaultGateway.address = "199.195.254.1";
|
|
|
|
defaultGateway6.address = "2605:6400:10::1";
|
2021-03-19 01:11:37 +00:00
|
|
|
interfaces.ens3 = {
|
|
|
|
ipv4.addresses = [{ address = "199.195.254.60"; prefixLength = 24; }];
|
|
|
|
ipv6.addresses = [{ address = "2605:6400:10:c77::1"; prefixLength = 48; }];
|
|
|
|
};
|
|
|
|
};
|
2021-03-19 16:16:06 +00:00
|
|
|
my.ip.tailscale = "100.99.236.25";
|
2021-03-19 01:11:37 +00:00
|
|
|
|
2021-07-01 01:48:12 +00:00
|
|
|
services.lukegbgp = let local = {
|
|
|
|
asn = 205479;
|
|
|
|
}; in {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
local = {
|
|
|
|
routerID = "199.195.254.60";
|
|
|
|
};
|
|
|
|
export = {
|
2021-11-06 19:56:06 +00:00
|
|
|
#v4 = ["92.118.29.0/24"];
|
2021-07-01 01:48:12 +00:00
|
|
|
};
|
|
|
|
peering = {
|
|
|
|
frantech = {
|
|
|
|
local = local // {
|
|
|
|
v4 = "199.195.254.60";
|
|
|
|
v6 = "2605:6400:10:c77::1";
|
|
|
|
};
|
|
|
|
remote = {
|
|
|
|
asn = 53667;
|
|
|
|
export_community = 4000;
|
|
|
|
routers = [{
|
|
|
|
v4 = "169.254.169.179";
|
|
|
|
v6 = "2605:6400:ffff::2";
|
|
|
|
multihop = 2;
|
|
|
|
password = machineSecrets.bgpPassword;
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-03-19 01:11:37 +00:00
|
|
|
system.stateVersion = "21.05";
|
|
|
|
}
|