2018-06-30 08:39:47 +00:00
|
|
|
# Nix app vms
|
2018-06-29 21:59:28 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
Simple application VM's based on Nix package manager.
|
|
|
|
|
|
|
|
Designed primarily for full screen usage without guest additions.
|
|
|
|
|
2018-06-30 21:13:35 +00:00
|
|
|
It's a proof-of-concept, but you can still use it. Also there is a lot of strange things inside, don't afraid of :)
|
2018-06-30 21:03:16 +00:00
|
|
|
|
2018-06-30 08:39:47 +00:00
|
|
|
## Install Nix package manager
|
2018-06-29 21:59:28 +00:00
|
|
|
|
2018-06-30 08:39:47 +00:00
|
|
|
$ su -c 'mkdir -m 0755 /nix && chown user /nix'
|
|
|
|
$ curl https://nixos.org/nix/install | sh
|
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
## Dependencies
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
$ su -c 'USE="spice virtfs" emerge qemu virt-manager'
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
## Add appvm to PATH
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
$ echo 'PATH=$PATH:$HOME/appvm/bin' >> ~/.bashrc
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
(if you clone appvm to home directory)
|
|
|
|
|
2018-06-30 21:56:43 +00:00
|
|
|
## Generate resolution
|
|
|
|
|
|
|
|
By default uses 3840x2160. If you need to regenerate `appvm/nix/monitor.nix`:
|
|
|
|
|
|
|
|
$ appvm/appvm.sh generate-resolution 1920 1080 > appvm/nix/monitor.nix
|
|
|
|
|
|
|
|
Autodetection is a bash-spaghetti, so you need to check results. BTW it's just a X.org monitor section.
|
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
## Create VM
|
|
|
|
|
2018-06-30 21:56:43 +00:00
|
|
|
$ $HOME/appvm/appvm.sh build chromium
|
2018-06-30 21:03:16 +00:00
|
|
|
|
|
|
|
## Run application
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
$ appvm.chromium
|
2018-06-30 08:39:47 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
## Shared directory
|
2018-06-29 21:59:28 +00:00
|
|
|
|
2018-06-30 21:03:16 +00:00
|
|
|
$ ls appvm/share/chromium
|
|
|
|
foo.tar.gz
|
|
|
|
bar.tar.gz
|