testing kubernetes network

This commit is contained in:
Richie Cahill
2024-05-25 12:48:46 -04:00
parent b106e7b9e2
commit 0388993f40
3 changed files with 31 additions and 2 deletions

26
modules/kub_net.nix Normal file
View File

@ -0,0 +1,26 @@
{ lib, ... }:
{
system.activationScripts.setZerotierName = lib.stringAfter [ "var" ] ''
echo "ebe7fbd44565ba9d=ztkubnet" > /var/lib/zerotier-one/devicemap
'';
services.zerotierone = {
enable = true;
joinNetworks = [ "ebe7fbd44565ba9d" ];
};
networking = {
vlans = {
vlan100 = {
id = 100;
interface = "ztkubnet";
};
};
interfaces.vlan100.ipv4.addresses = [
{
address = "10.10.10.3";
prefixLength = 24;
}
];
};
}