fix use of globals within VM

This commit is contained in:
Pim Kunis 2024-02-29 19:50:05 +01:00
parent e7f35bf1bd
commit 45d9ab3cb7

View file

@ -132,21 +132,18 @@ in
type = "virtual";
hypervisorName = "lewis";
nixosModule = { config, ... }: {
nixosModule = { hypervisorConfig, ... }: {
lab = {
networking = {
dmz.services.enable = true;
staticNetworking = true;
# TODO: This seems to cause infinite recursion? Really weird.
# staticIPv4 = config.lab.networking.dmz.ipv4.services;
# staticIPv6 = config.lab.networking.dmz.ipv6.services;
staticIPv4 = "192.168.30.7";
staticIPv6 = "2a0d:6e00:1a77:30::7";
staticIPv4 = hypervisorConfig.lab.networking.dmz.ipv4.services;
staticIPv6 = hypervisorConfig.lab.networking.dmz.ipv6.services;
};
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?
# 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;
shares = [{