Deploy redtail1 and whitestorm2
This commit is contained in:
parent
2cba9dce24
commit
ba9e894829
1 changed files with 35 additions and 2 deletions
37
flake.nix
37
flake.nix
|
@ -332,7 +332,7 @@
|
|||
];
|
||||
};
|
||||
|
||||
makePostgresConfig = { hostname, keyFile, primaryIp ? null }:
|
||||
makePostgresConfig = { hostname, selfIp, macAddress, keyFile, primaryIp ? null }:
|
||||
with image-builder.packages.aarch64-linux.modules;
|
||||
let
|
||||
device = "/dev/mapper/cryptdrive1";
|
||||
|
@ -380,6 +380,21 @@
|
|||
options = [ "defaults" "compress=zstd" "rw" ];
|
||||
};
|
||||
})
|
||||
{
|
||||
networking = {
|
||||
interfaces.end0 = {
|
||||
inherit macAddress;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = selfIp;
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = "192.168.20.1";
|
||||
nameservers = [ "192.168.20.21" "192.168.20.1" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -412,24 +427,32 @@
|
|||
|
||||
redtail1 = makePostgresConfig {
|
||||
hostname = "redtail1";
|
||||
selfIp = "192.168.20.23";
|
||||
macAddress = "02:fe:30:d8:cf:64";
|
||||
keyFile = "redtailKeyFile";
|
||||
primaryIp = "192.168.20.24";
|
||||
};
|
||||
|
||||
redtail2 = makePostgresConfig {
|
||||
hostname = "redtail2";
|
||||
selfIp = "192.168.20.24";
|
||||
macAddress = "02:8a:70:2a:a8:5e";
|
||||
keyFile = "redtailKeyFile";
|
||||
# primaryIp = "192.168.20.23";
|
||||
};
|
||||
|
||||
whitestorm1 = makePostgresConfig {
|
||||
hostname = "whitestorm1";
|
||||
selfIp = "192.168.20.26";
|
||||
macAddress = "02:71:18:30:fc:0f";
|
||||
keyFile = "whitestormKeyFile";
|
||||
# primaryIp = "192.168.20.11";
|
||||
# primaryIp = "192.168.20.27";
|
||||
};
|
||||
|
||||
whitestorm2 = makePostgresConfig {
|
||||
hostname = "whitestorm2";
|
||||
selfIp = "192.168.20.27";
|
||||
macAddress = "02:ff:ce:a9:d3:74";
|
||||
keyFile = "whitestormKeyFile";
|
||||
primaryIp = "192.168.20.26";
|
||||
};
|
||||
|
@ -517,6 +540,16 @@
|
|||
};
|
||||
};
|
||||
|
||||
deploy.nodes.redtail1 = deployer {
|
||||
hostname = "192.168.20.23";
|
||||
configuration = self.nixosConfigurations.redtail1;
|
||||
};
|
||||
|
||||
deploy.nodes.whitestorm2 = deployer {
|
||||
hostname = "192.168.20.27";
|
||||
configuration = self.nixosConfigurations.whitestorm2;
|
||||
};
|
||||
|
||||
deploy.nodes.nextcloud2 = deployer {
|
||||
hostname = "192.168.20.28";
|
||||
configuration = self.nixosConfigurations.nextcloud2;
|
||||
|
|
Loading…
Reference in a new issue