Add rock64s

This commit is contained in:
asonix 2023-02-08 22:06:03 -06:00
parent 110cf74c1b
commit 2760cd679c

View file

@ -39,7 +39,7 @@
] ++ extraModules;
};
makeGenericK3sConfig = { hostname, enableK3s ? true, selfIp, serverIp ? null, extraModules ? [ ] }:
makeGenericK3sConfig = { hostname, macAddress ? null, enableK3s ? true, selfIp, serverIp ? null, extraModules ? [ ] }:
with image-builder.packages.aarch64-linux.modules;
makeConfig {
inherit hostname;
@ -58,12 +58,15 @@
services.lvm.enable = true;
networking = {
interfaces.end0.ipv4.addresses = [
{
address = selfIp;
prefixLength = 24;
}
];
interfaces.end0 = {
inherit macAddress;
ipv4.addresses = [
{
address = selfIp;
prefixLength = 24;
}
];
};
defaultGateway = "192.168.20.1";
nameservers = [ "192.168.20.21" "192.168.20.1" ];
};
@ -75,9 +78,9 @@
] ++ extraModules;
};
makeBoardK3sConfig = module: { hostname, enableK3s ? true, selfIp, serverIp }:
makeBoardK3sConfig = module: { hostname, macAddress ? null, enableK3s ? true, selfIp, serverIp }:
makeGenericK3sConfig {
inherit hostname enableK3s selfIp serverIp;
inherit hostname macAddress enableK3s selfIp serverIp;
extraModules = [ module ];
};
@ -420,6 +423,35 @@
hostname = "k3s-rock1";
selfIp = "192.168.20.20";
serverIp = "192.168.20.120";
macAddress = "02:36:51:19:8c:5d";
};
k3s-rock2 = makeRock64K3sConfig {
hostname = "k3s-rock2";
selfIp = "192.168.20.111";
serverIp = "192.168.20.120";
macAddress = "02:af:fa:0e:c5:41";
};
k3s-rock3 = makeRock64K3sConfig {
hostname = "k3s-rock3";
selfIp = "192.168.20.112";
serverIp = "192.168.20.120";
macAddress = "02:86:c1:62:77:51";
};
k3s-rock4 = makeRock64K3sConfig {
hostname = "k3s-rock4";
selfIp = "192.168.20.113";
serverIp = "192.168.20.120";
macAddress = "02:7a:2e:2c:bb:99";
};
k3s-rock5 = makeRock64K3sConfig {
hostname = "k3s-rock5";
selfIp = "192.168.20.114";
serverIp = "192.168.20.120";
macAddress = "02:76:67:0f:a0:b7";
};
k3s-quartza1 = makeQuartz64AK3sConfig {
@ -475,6 +507,26 @@
configuration = self.nixosConfigurations.k3s-rock1;
};
deploy.nodes.k3s-rock2 = deployer {
hostname = "192.168.20.111";
configuration = self.nixosConfigurations.k3s-rock2;
};
deploy.nodes.k3s-rock3 = deployer {
hostname = "192.168.20.112";
configuration = self.nixosConfigurations.k3s-rock3;
};
deploy.nodes.k3s-rock4 = deployer {
hostname = "192.168.20.113";
configuration = self.nixosConfigurations.k3s-rock4;
};
deploy.nodes.k3s-rock5 = deployer {
hostname = "192.168.20.114";
configuration = self.nixosConfigurations.k3s-rock5;
};
deploy.nodes.k3s-quartza1 = deployer {
hostname = "192.168.20.160";
configuration = self.nixosConfigurations.k3s-quartza1;