profiles/glucagon: init

Factor out all the networking configuration specific to Glucagon.

Signed-off-by: Ryan Lahfa <federez-infra@lahfa.xyz>
This commit is contained in:
Ryan Lahfa 2024-02-13 01:20:43 +01:00
parent 3ed9d02acb
commit 76218cc7cb
2 changed files with 61 additions and 53 deletions

View file

@ -14,6 +14,7 @@ in
defaults = { pkgs, ... }: {
imports = [
./profiles/sysadmin.nix
./profiles/glucagon.nix
"${src.agenix}/modules/age.nix"
(disko.config diskConfig)
];
@ -35,27 +36,13 @@ in
estragon = { name, nodes, ... }: {
deployment.tags = [ "matrix" ];
deployment.targetHost = "estragon.federez.net";
systemd.network.links."10-wan" = {
matchConfig.MACAddress = "BC:24:11:5C:A4:5A";
linkConfig.Name = "wan";
};
systemd.network.networks."10-wan" = {
matchConfig.Name = "wan";
address = [
"172.17.8.227/22"
];
routes = [
{
routeConfig = {
Gateway = "172.17.11.254";
};
}
];
linkConfig.RequiredForOnline = "routable";
};
networking.hostName = name;
glucagon.networking = {
nibble = 227;
wan-mac = "BC:24:11:5C:A4:5A";
};
imports = [
./profiles/vm.nix
./profiles/matrix-server.nix
@ -70,23 +57,9 @@ in
deployment.targetHost = "wagon.federez.net";
networking.hostName = name;
systemd.network.links."10-wan" = {
matchConfig.MACAddress = "BC:24:11:EA:6C:0B";
linkConfig.Name = "wan";
};
systemd.network.networks."10-wan" = {
matchConfig.Name = "wan";
address = [
"172.17.8.228/22"
];
routes = [
{
routeConfig = {
Gateway = "172.17.11.254";
};
}
];
linkConfig.RequiredForOnline = "routable";
glucagon.networking = {
nibble = 228;
wan-mac = "BC:24:11:EA:6C:0B";
};
imports = [
@ -100,23 +73,9 @@ in
deployment.targetHost = "lagon.federez.net";
networking.hostName = name;
systemd.network.links."10-wan" = {
matchConfig.MACAddress = "BC:24:11:7F:19:60";
linkConfig.Name = "wan";
};
systemd.network.networks."10-wan" = {
matchConfig.Name = "wan";
address = [
"172.17.8.229/22"
];
routes = [
{
routeConfig = {
Gateway = "172.17.11.254";
};
}
];
linkConfig.RequiredForOnline = "routable";
glucagon.networking = {
nibble = 229;
wan-mac = "BC:24:11:7F:19:60";
};
imports = [