Open Velnbur opened 1 year ago
It looks like Hydra's cache might not be populated, yet, but I'll fix the instructions to reference an older (pinned) version of the builder.
In the meantime, I believe you can work around this problem by running:
$ nix run 'github:NixOS/nixpkgs/23.05#darwin.builder'
… and updating the rest of your configuration to match the instructions from this version of the manual: https://nixos.org/manual/nixpkgs/stable/#sec-darwin-builder
I'm essentially going to be updating the book to say the same thing.
I tried to start the linux builder in one terminal and it won't start:
❯ nix run 'github:NixOS/nixpkgs/#darwin.linux-builder'
Formatting '/tmp/nix-vm.AXuTUxIF5k/store.img', fmt=qcow2 cluster_size=65536 extende
d_l2=off compression_type=zlib size=1285554176 backing_file=/nix/store/11rf9pfn70qi
wvh1y7jv4sr0mvxlrcg3-nixos-disk-image/nixos.qcow2 backing_fmt=qcow2 lazy_refcounts=
off refcount_bits=16
[ 0.078541] armv8-pmu pmu: hw perfevents: failed to probe PMU!
<<< NixOS Stage 1 >>>
loading module virtio_balloon...
loading module virtio_console...
loading module virtio_rng...
loading module dm_mod...
running udev...
Starting systemd-udevd version 253.6
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
starting device mapper and LVM...
waiting for device /dev/disk/by-label/nixos to appear.......................
Timed out waiting for device /dev/disk/by-label/nixos, trying to mount anyway.
mounting /dev/disk/by-label/nixos on /...
[ 21.939051] /dev/disk/by-label/nixos: Can't open blockdev
mount: mounting /dev/disk/by-label/nixos on /mnt-root/ failed: No such file or dire
ctory
An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one
of the following keys:
r) to reboot immediately
*) to ignore the error and continue
If I try to run it with a most up to date nixpkgs version as you suggested it complaints about not being able to set up the port forwarding:
❯ nix run 'github:NixOS/nixpkgs/23.05#darwin.builder'
Formatting '/tmp/nix-vm.4402DYK4ib/store.img', fmt=qcow2 cluster_size=65536 extende
d_l2=off compression_type=zlib size=1250951168 backing_file=/nix/store/0rq0q84l6wlg
r0nmlwly4ywi2lfk1n77-nixos-disk-image/nixos.qcow2 backing_fmt=qcow2 lazy_refcounts=
off refcount_bits=16qemu-system-aarch64: -netdev user,id=user.0,hostfwd=tcp::22-:22,: Could not set up
host forwarding rule 'tcp::22-:22'
Okay, it looks like ventura 13.0
Enables remotelogin by default, or at least it was enabled on my system. If anyone encounters this, you can turn remote login off with sudo systemsetup -setremotelogin off
. This will ensure that the VM starts:
But then when running nix run in another shell it produces the error that Velnbur mentioned:
I followed exactly your instructions and it works @Gabriella439 ❤️ ! For anyone that lands on this Issue:
1). Try to start the builder once with nix run 'github:NixOS/nixpkgs/23.05#darwin.builder'
, you need to do this in the same folder that you have done the nix flake init --template 'github:Gabriella439/nixos-in-production/0.6#setup'
1.2). If you have issues with the port already being allocated disable remote login if you have it enabled via sudo systemsetup -setremotelogin off
2). Once you have started the builder and sutted it down with shutdown now all subsequent builders start should be done via nix run in the folder you have the flake.
3). Update the nix.conf
including a builder section as explained in here, you can see an example in my dot-files
❤️ ❤️ ❤️ ❤️
Steps to reproduce
nix run 'nixpkgs#darwin.linux-builder'
in one terminalnix flake init --template 'github:Gabriella439/nixos-in-production/0.6#setup
on host machinenix run
on host machine, got an error: