An easy to use Linux builder for macOS [maintainer=@nicknovitski]
Go to file
zimbatm c7f3d0e495
remove nix from release.nix
it's already tested upstream
2018-11-07 17:26:45 +01:00
go-vpnkit Port the work from nixpkgs 2018-04-10 14:55:20 -04:00
hyperkit License hyperkit 2018-07-07 11:25:56 -04:00
linuxkit Initial commit 2018-04-02 05:57:18 -07:00
linuxkit-builder Update configure.sh 2018-11-06 23:38:28 +01:00
nix-linuxkit-runner runner: pass -v instead of -verbose 2018-05-24 11:07:24 -04:00
nix-script-store-plugin nix-script-store-plugin: move into own folder 2018-11-07 17:26:43 +01: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 Reimport properly 2018-07-07 11:48:56 -04:00
example.nix Port the work from nixpkgs 2018-04-10 14:55:20 -04:00
overlay.nix overlay: use super instead of self 2018-11-07 17:26:44 +01:00
README.md update the Nix requirements 2018-11-03 16:58:08 +01:00
release.nix remove nix from release.nix 2018-11-07 17:26:45 +01:00

LinuxKit Nix - Linux Nix VM

LinuxKit Nix makes it easy to build Linux binaries from a macOS machine using Nix. It's installing a VM using the native virtualization (Hypervisor.Framework) so it's quite liteweight compared to installing VirtualBox. The project also comes with an installation script that configures Nix to use the VM as a remote builder automatically.

Requirements

This project depends on Nix and a nixpkgs channel >= 18.03.

Installation

Fetch it from the NixOS binary cache:

nix-env -i /nix/store/v4i5gx94r2qxs91mfy8sz4mmnigzravy-linuxkit-builder
nix-linuxkit-configure

It'll write to:

  • ~/.cache/nix-linuxkit-builder/, in particular ~/.cache/nix-linuxkit-builder/nix-state/console-ring is interesting
  • ~root/.ssh/ for the SSH config
  • /etc/nix/machines
  • ~/Library/LaunchAgents/org.nix-community.linuxkit-builder.plist

It should automatically start and stay running, but ...

You can force start it with:

launchctl start org.nix-community.linuxkit-builder

You can force stop it with:

launchctl stop org.nix-community.linuxkit-builder

If after you stop it you may want to check for processes, like:

pgrep vpnkit
pgrep linuxkit
pgrep hyperkit

If something goes wrong and it didn't stop properly, you can try:

pkill -F ~/.cache/nix-linuxkit-builder/nix-state/hyperkit.pid hyperkit