An easy to use Linux builder for macOS [maintainer=@nicknovitski]
Go to file
2018-05-23 09:58:20 -04:00
go-vpnkit Port the work from nixpkgs 2018-04-10 14:55:20 -04:00
hyperkit Initial commit 2018-04-02 05:57:18 -07:00
linuxkit Initial commit 2018-04-02 05:57:18 -07:00
linuxkit-builder Increase defaults RAM 1024m -> 4096m, DISK 10g -> 80g 2018-05-14 13:25:43 -04:00
nix-linuxkit-runner nix-linuxkit-runner: init 2018-05-23 09:58:20 -04:00
virtsock Initial commit 2018-04-02 05:57:18 -07:00
vpnkit Initial commit 2018-04-02 05:57:18 -07:00
.gitignore Initial commit 2018-04-02 05:57:18 -07:00
COPYING Add license 2018-04-03 14:06:35 -07:00
default.nix Initial commit 2018-04-02 05:57:18 -07:00
example.nix Port the work from nixpkgs 2018-04-10 14:55:20 -04:00
overlay.nix nix-linuxkit-runner: init 2018-05-23 09:58:20 -04:00
README.md Update readme 2018-04-11 08:48:41 -04:00

linuxkit-builder

Installation

With a standard Nix installation, and a simple SSH-based remote

Install the packages into the default profile:

sudo nix-env -f . -p /nix/var/nix/profiles/default -iA linuxkit-builder

As your user, run:

linuxkit-builder

Then when it says so, run:

~/.nixpkgs/linuxkit-builder/finish-setup.sh

Now you can run builds:

nix-build example.nix

With a patched Nix installation and the script-based remote

Install the packages into the default profile:

sudo nix-env -f . -p /nix/var/nix/profiles/default -iA nixUnstable nix-script-store-plugin linuxkit-builder

Update /etc/nix/nix.conf with the plugin:

plugin-files = /nix/var/nix/profiles/default/lib/nix/plugins/libnix-script-store.dylib

Restart nix-daemon:

sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist

As your user, run:

linuxkit-builder

Then when it says so, run:

~/.nixpkgs/linuxkit-builder/finish-setup.sh

and follow the instructions starting at the end (skipping #1 and #2)

Restart nix-daemon:

sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist

Now you can run builds:

nix-build example.nix

Stopping the builder

If you've run the builder at the terminal, you can just type stop at the prompt. Or, you can run:

kill $(cat ~/.nixpkgs/linuxkit-builder/nix-state/hyperkit.pid)