majiru / 9front-in-a-box

A nix flake for running 9front virtual machines with drawterm
40 stars 2 forks source link

Nixos module #9

Open 9glenda opened 10 months ago

9glenda commented 10 months ago

This is a initial concept based of some testing code I had laying around. I'd like you to give feedback on rather that's actually a good starting point for the module.

The creation of the VMs is not yet implemented. And the NAT + bridge based networking is commented out in the run script.

majiru commented 10 months ago

This is a pretty good start! My suggestion would be to perhaps avoid the NAT and vnet0 stuff, for the case that is would be useful to allow the VM to netboot off of the local network. For example in my home network I have my 9front as DHCP and usually can just start a 9front instance with -kernel with no disk and then have it pick up the boot options from DHCP and automatically netboot. I just have a bridge with my actual ethernet card along with a handful of taps. If the vm were to be behind an additional NAT some stuff becomes harder. I think my suggestion would be to accept a tap to be given for the VM to use and just take it at face value with no additional configuration with a default of null. Then if null is given we can just use usermode TCP + port forwarding as we do already. It seems a bit tricky to get too involved with what the user would like to do with their network setup.