create VM running k3s

This commit is contained in:
Pim Kunis 2024-02-11 14:18:11 +01:00
parent 5865e8a95a
commit 03e816ff21
3 changed files with 33 additions and 7 deletions

View file

@ -56,7 +56,6 @@
};
};
# TODO: make leases persistent!
hermes = {
type = "virtual";
hypervisorName = "lewis";
@ -67,6 +66,7 @@
vm = {
# TODO: would be cool to create a check that a mac address is only ever assigned to one VM.
# TODO: idea: what if we generated these IDs by hashing the host name and reducing that to the amount of hosts possible?
id = 7;
staticNetworking = true;
staticIPv4 = config.lab.networking.dmz.ipv4.services;
@ -125,4 +125,26 @@
};
};
};
k3s = {
type = "virtual";
hypervisorName = "atlas";
nixosModule = {
microvm.balloonMem = 7680;
lab = {
k3s.enable = true;
vm = {
id = 4;
shares = [{
name = "k3s";
mountPoint = "/var/lib/rancher/k3s";
}];
};
};
};
};
}