add ip and mac arithmatic functions
calculate vm mac addresses
This commit is contained in:
parent
beb1c384ec
commit
885cba2f30
4 changed files with 1344 additions and 6 deletions
|
@ -64,7 +64,7 @@
|
|||
|
||||
nixosModule = { pkgs, ... }: {
|
||||
# TODO: would be cool to create a check that a mac address is only ever assigned to one VM.
|
||||
lab.vm.macAddress = "BA:DB:EE:F0:00:00";
|
||||
lab.vm.id = 0;
|
||||
|
||||
programs.bash.interactiveShellInit = ''
|
||||
echo "Hello world from inside a virtual machine!!" | ${pkgs.lolcat}/bin/lolcat
|
||||
|
@ -81,7 +81,7 @@
|
|||
networking.dmz.services.enable = true;
|
||||
|
||||
vm = {
|
||||
macAddress = "BA:DB:EE:F0:00:07";
|
||||
id = 7;
|
||||
staticNetworking = true;
|
||||
staticIPv4 = config.lab.networking.dmz.ipv4.services;
|
||||
staticIPv6 = config.lab.networking.dmz.ipv6.services;
|
||||
|
|
Reference in a new issue