Simple one-off script to download and install Nix and NixOps and make it to prepare it for deployments on Mac. Inspired by these instructions.
The script executes the following steps:
/nix
.~/.profile
First, configure VirtualBox (source):
Then, check out this repository in a terminal and run the install script:
git clone git://github.com/zefhemel/nixos-mac-setup.git
cd nixos-mac-setup
./install.sh
To test:
nixops create test/trivial.nix test/trivial-vbox.nix --name test
nixops deploy -d test
After you reboot the NixStore.dmg
will not automatically be remounted to mount it again, run ./attach-disk.sh
again.
By default the NixStore.dmg file is 10G which should be enough for a while, if you want resize it, play with these commands:
hdiutil detach /nix
hdiutil resize -size 50g NixStore.dmg
hdiutil attach NixStore.dmg -mountpoint /nix