| 21 Jan 2026 |
eveeifyeve | Hardware accelerated, but the real question is that if it uses https://developer.apple.com/documentation/virtualization | 13:06:49 |
K900 | Why does that matter exactly? | 13:07:25 |
eveeifyeve | * Hardware accelerated could still mean emulated, but the real question is that if it uses https://developer.apple.com/documentation/virtualization | 13:07:27 |
Ihar Hrachyshka | It's accelerated and performant enough, at one point I did my Linux development in a nixpkgs VM, ran kind clusters and such. | 13:07:32 |
eveeifyeve | https://determinate.systems/blog/changelog-determinate-nix-384/#why | 13:08:27 |
K900 | And? | 13:08:57 |
Steve | Hi there, I'm attempting to create an installation image using nix-community/nixos-generators on macOS, but I'm encountering strange issues related to my "$HOME" environment variable. When I execute nix build as a regular user, it reports that $HOME is set to "/build", which is not the case. However, when I "sudo nix build", it reports that $HOME is set to my user directory (not root?). Nevertheless, it then complains that the directory is not owned by root.
Has anyone encountered such unusual behavior before? I'm at a loss for what to do. I would greatly appreciate any insights or suggestions you may have. Thank you in advance for your assistance.
| 13:10:54 |
K900 | I'd be really surprised if that actually works on a Darwin host tbh | 13:11:24 |
Katalin πͺ | sudo does not reset $HOME | 13:12:17 |
Katalin πͺ | add -i | 13:12:18 |
Ihar Hrachyshka | I did use nixos-generators on Darwin to create virtualbox images. Why wouldn't it work? | 13:12:54 |
K900 | Because you'd have to build some NixOS bits presumably? | 13:13:32 |
Steve | That's exactly what I'm trying to do. Just for UTM. | 13:13:42 |
Ihar Hrachyshka | Oh sure but you always have a Linux builder. | 13:14:00 |
eveeifyeve | Looking at QEMU source code, it unfortunately doesn't. | 13:14:01 |
K900 | I am still confused why you think this even matters | 13:14:15 |
K900 | I don't know what exactly it does | 13:14:21 |
K900 | But it does not introduce major CPU overhead | 13:14:29 |
K900 | So I'm not sure what your problem is | 13:14:33 |
Steve | -i brings "unrecognized flag". I'm using determinate Nix. Is that maybe the problem? | 13:14:39 |
Katalin πͺ | (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 |
Katalin πͺ | sudo -i | 13:14:47 |
Steve | 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 |
Katalin πͺ | well okay that's not the problem then | 13:15:49 |
Katalin πͺ | these are just warnings and it picks the correct one (-ish) anyway | 13:16:02 |
eveeifyeve | QEMU can offer slower speeds when on a arm host than using the native framework that is optimized for apple hardware. | 13:16:12 |
Katalin πͺ | > chmod: changing permissions of '/build': Operation not permitted
this is the problem | 13:16:21 |
K900 | Have you actually measured this | 13:16:22 |
K900 | Because like | 13:16:25 |
K900 | No | 13:16:26 |