Simple application VMs (hypervisor-based sandbox) based on Nix package manager.
Uses one read-only /nix directory for all appvms. So creating a new appvm (but not first) is just about one minute.
The home directory of each appvm is inside ~/appvm, so you can easily share files between the two as and when needed
-
Clone this repo.
-
Run
go buildto build the program -
Run
./appvm generate braveto generate the config files for Brave.
Note: If you use flakes for NixOS, nix channels probably won't appear when you run this as a normal user. Run the command as root in this case (it just needs to create configs, it doesn't do anything else)
- Run
./appvm start braveto launch Brave inside the VM. (this can be done as your user only, you don't need to use root!)
Right now as a proof of concept only Brave is contained inside the config, however the code can be extended to allow any program you want here.
You can customize local settings in ~/.config/appvm/nix/local.nix.
Default hotkey to release cursor: ctrl+alt.
$ ls appvm/chromium
foo.tar.gz
bar.tar.gz
$ appvm stop chromium