!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1182 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org194 Servers

Load older messages


SenderMessageTime
21 Jan 2026
@saiko:knifepoint.netKatalin 🔪 add -i 13:12:18
@ihar.hrachyshka:matrix.orgIhar HrachyshkaI did use nixos-generators on Darwin to create virtualbox images. Why wouldn't it work?13:12:54
@k900:0upti.meK900Because you'd have to build some NixOS bits presumably?13:13:32
@steve_in_the_matrix:matrix.orgSteveThat's exactly what I'm trying to do. Just for UTM.13:13:42
@ihar.hrachyshka:matrix.orgIhar HrachyshkaOh sure but you always have a Linux builder.13:14:00
@eveeifyeve:matrix.orgeveeifyeveLooking at QEMU source code, it unfortunately doesn't.13:14:01
@k900:0upti.meK900 I am still confused why you think this even matters 13:14:15
@k900:0upti.meK900I don't know what exactly it does13:14:21
@k900:0upti.meK900But it does not introduce major CPU overhead13:14:29
@k900:0upti.meK900So I'm not sure what your problem is13:14:33
@steve_in_the_matrix:matrix.orgSteve-i brings "unrecognized flag". I'm using determinate Nix. Is that maybe the problem?13:14:39
@saiko:knifepoint.netKatalin 🔪 (but I do wonder why nix build also doesn't reset $HOME. I think usually it should be set to /homeless-shelter. probably doesn't do that when the sandbox is disabled?) 13:14:40
@saiko:knifepoint.netKatalin 🔪 sudo -i 13:14:47
@steve_in_the_matrix:matrix.orgSteve

That's the output:

sudo determinate-nixd upgrade
You are already running the latest version of Determinate Nix (3.15.1).

echo $HOME
/Users/bob

nix build -L .#nixosConfigurations.installer-aarch64.config.formats.qcow-efi
evaluating derivation 'git+file:///Users/bob/coding#nixosConfigurations.installer-aarch64.config.formats.qcow-efi'
nixos-disk-image> warning: $HOME ('/build') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/empty')
nixos-disk-image> chmod: changing permissions of '/build': Operation not permitted
error: Cannot build '/nix/store/ylpcrwmdbr3f4q1sqjvdi8a2nbz671r2-nixos-disk-image.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/6sbfv1lzjmr6aldy423x0gjplvwqhajk-nixos-disk-image
Last 2 log lines:
> warning: $HOME ('/build') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/empty')
> chmod: changing permissions of '/build': Operation not permitted
...
error: Build failed due to failed dependency

sudo nix build -L .#nixosConfigurations.installer-aarch64.config.formats.qcow-efi
warning: $HOME ('/Users/bob') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
warning: $HOME ('/Users/bob') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
nixos-disk-image> warning: $HOME ('/build') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/empty')
nixos-disk-image> chmod: changing permissions of '/build': Operation not permitted
...
error: Build failed due to failed dependency

13:15:25
@saiko:knifepoint.netKatalin 🔪 well okay that's not the problem then 13:15:49
@saiko:knifepoint.netKatalin 🔪 these are just warnings and it picks the correct one (-ish) anyway 13:16:02
@eveeifyeve:matrix.orgeveeifyeveQEMU can offer slower speeds when on a arm host than using the native framework that is optimized for apple hardware.13:16:12
@saiko:knifepoint.netKatalin 🔪 > chmod: changing permissions of '/build': Operation not permitted

this is the problem
13:16:21
@k900:0upti.meK900 Have you actually measured this 13:16:22
@k900:0upti.meK900Because like13:16:25
@k900:0upti.meK900No13:16:26
@saiko:knifepoint.netKatalin 🔪 but I have no quick answer for what's going on there 13:16:51
@ihar.hrachyshka:matrix.orgIhar Hrachyshka
In reply to @eveeifyeve:matrix.org
QEMU can offer slower speeds when on a arm host than using the native framework that is optimized for apple hardware.
Actually curious if there are public benchmarks
13:17:06
@reckenrode:matrix.orgRandy EckenrodeQEMU doesn’t need to use the Vietualization framework to be hardware accelerated. There are other, lower level, ways of accomplishing that.13:17:19
@steve_in_the_matrix:matrix.orgSteveThere is no /build directory. I've never configured such a thing. I seems like hardcoded somewhere ...13:17:36
@reckenrode:matrix.orgRandy EckenrodeMesa is working on support for passthrough Vulkan to a Darwin host.13:17:39
@reckenrode:matrix.orgRandy Eckenrode It will support MoltenVK, but you’ll really only want to use KosmicKrisp. 13:18:17
@eveeifyeve:matrix.orgeveeifyeveThere is public benchmarks of it here: https://github.com/lima-vm/lima/issues/126913:18:18
@saiko:knifepoint.netKatalin 🔪 inside the sandboxed nix build on linux, the cwd is /build afaik 13:18:24
@saiko:knifepoint.netKatalin 🔪 I think you cannot do that on macOS due to no mount namespaces 13:18:35

Show newer messages


Back to Room ListRoom Version: 6