45 lines
975 B
Nix
45 lines
975 B
Nix
# SPDX-FileCopyrightText: 2024 Luke Granger-Brown <depot@lukegb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{ depot, lib, pkgs, config, ... }:
|
|
|
|
{
|
|
systemd.network.netdevs."40-br-public" = {
|
|
netdevConfig = {
|
|
Name = "br-public";
|
|
Kind = "bridge";
|
|
};
|
|
};
|
|
systemd.network.networks."40-br-public" = {
|
|
matchConfig.Name = "br-public";
|
|
address = [
|
|
"92.118.28.1/24"
|
|
"2a09:a441::1/48"
|
|
"fe80::f00f/64"
|
|
];
|
|
networkConfig.IPv6SendRA = true;
|
|
ipv6Prefixes = [{ ipv6PrefixConfig = {
|
|
Prefix = "2a09:a441:0:ffff::/64";
|
|
Assign = true;
|
|
}; }];
|
|
};
|
|
|
|
systemd.network.netdevs."40-br-mgmt" = {
|
|
netdevConfig = {
|
|
Name = "br-mgmt";
|
|
Kind = "bridge";
|
|
};
|
|
};
|
|
systemd.network.networks."40-br-mgmt" = {
|
|
matchConfig.Name = "br-mgmt";
|
|
address = [
|
|
"10.100.0.254/23"
|
|
];
|
|
};
|
|
|
|
services.lukegbgp.config = {
|
|
export.v4 = [ "92.118.28.0/24" ];
|
|
export.v6 = [ "2a09:a441::/32" ];
|
|
};
|
|
}
|