Open grebban-yamashita opened 3 weeks ago
When you've freshly rebooted and the store is not mounted, what is the output of the following commands?
launchctl print system/org.nixos.darwin-store
diskutil info 8474bf18-8044-4acc-b351-f8c214502e41
When you say "Manually mounting the disk works", how do you do this? Via the Disk Utility app, or via the diskutil
command line? If using the app, what happens if you run /usr/sbin/diskutil mount -mountPoint /nix 8474BF18-8044-4ACC-B351-F8C214502E41
?
launchctl print system/org.nixos.darwin-store
diskutil info 8474bf18-8044-4acc-b351-f8c214502e41
Output here:
$ launchctl print system/org.nixos.darwin-store Bad request. Could not find service "org.nixos.darwin-store" in domain for system $ launchctl print system | grep darwin $ diskutil info 8474bf18-8044-4acc-b351-f8c214502e41 Device Identifier: disk3s7 Device Node: /dev/disk3s7 Whole: No Part of Whole: disk3
Volume Name: Nix Store Mounted: Yes Mount Point: /nix
Partition Type: 41504653-0000-11AA-AA11-00306543ECAC File System Personality: APFS Type (Bundle): apfs Name (User Visible): APFS Owners: Enabled
OS Can Be Installed: Yes Booter Disk: disk3s2 Recovery Disk: disk3s3 Media Type: Generic Protocol: Apple Fabric SMART Status: Verified Volume UUID: 8474BF18-8044-4ACC-B351-F8C214502E41 Disk / Partition UUID: 8474BF18-8044-4ACC-B351-F8C214502E41
Disk Size: 494.4 GB (494384795648 Bytes) (exactly 965595304 512-Byte-Units) Device Block Size: 4096 Bytes
Volume Used Space: 10.1 GB (10050531328 Bytes) (exactly 19629944 512-Byte-Units) Container Total Space: 494.4 GB (494384795648 Bytes) (exactly 965595304 512-Byte-Units) Container Free Space: 442.1 GB (442072637440 Bytes) (exactly 863423120 512-Byte-Units) Allocation Block Size: 4096 Bytes
Media OS Use Only: No Media Read-Only: No Volume Read-Only: No
Device Location: Internal Removable Media: Fixed
Solid State: Yes Hardware AES Support: Yes
This disk is an APFS Volume. APFS Information: APFS Container: disk3 APFS Physical Store: disk0s2 Fusion Drive: No FileVault: No Sealed: No Locked: No
> When you say "Manually mounting the disk works", how do you do this? Via the Disk Utility app
Yes, I use the Disk Utility app.
> If using the app, what happens if you run [...]
$ /usr/sbin/diskutil mount -mountPoint /nix 8474BF18-8044-4ACC-B351-F8C214502E41 Volume Nix Store on 8474BF18-8044-4ACC-B351-F8C214502E41 mounted
NOTE: Every time I restart the MacBook I need to manually mount the disk again.
That bad request is very weird, and something I have never seen before................
However, after some searching I think I've found a similar issue on the NixOS Discourse: https://discourse.nixos.org/t/macos-upgrade-breakage/50691, and this post proposes a solution: https://discourse.nixos.org/t/macos-upgrade-breakage/50691/7. Could you give that a shot and see if it fixes your issue?
Two sh
services are present, and enabled by default.
Clicking the icon next to them just shows the path to /bin/sh
Hm. I found another issue that also had the "Bad request" text: https://github.com/NixOS/nix/issues/9978
If you run sudo launchctl print system | grep nix
and sudo launchctl print-disabled system
, do any nix-related services show up there? If so, you may need to enable them with sudo launchctl enable system/org.nixos.darwin-store
, etc.
If that doesn't solve your issue, what is the output of ls -al /Library/LaunchDaemons/org.nixos*
?
Hm. I found another issue that also had the "Bad request" text: NixOS/nix#9978
If you run
sudo launchctl print system | grep nix
andsudo launchctl print-disabled system
, do any nix-related services show up there? If so, you may need to enable them withsudo launchctl enable system/org.nixos.darwin-store
, etc.$ sudo launchctl print system | grep nix 1752 - systems.determinate.nix-daemon 0 0 systems.determinate.nix-installer.nix-hook 0 1 systems.determinate.nix-store 0 0 org.nixos.activate-system "systems.determinate.nix-store" => enabled "org.nixos.activate-system" => enabled "systems.determinate.nix-daemon" => enabled
$ sudo launchctl print-disabled system
disabled services = {
"com.apple.CSCSupportd" => disabled
"com.apple.mdmclient.daemon.runatboot" => disabled
"com.apple.ftpd" => disabled
"systems.determinate.nix-store" => enabled
"org.nixos.activate-system" => enabled
"systems.determinate.nix-daemon" => enabled
}
They all seem to be enabled.
If that doesn't solve your issue, what is the output of
ls -al /Library/LaunchDaemons/org.nixos*
?
-r--r--r-- 1 root wheel 591 Oct 30 08:32 /Library/LaunchDaemons/org.nixos.activate-system.plist
Also of note is that I did reinstall my MacBook twice. The first time I noticed this issue I thought it might be because of something I had done. The second time the issue still persisted, which is when I created this issue.
@grebban-yamashita interesting. Looking at your log, it looks like you're installing the standard upstream Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install
and then applying your flake with nix-darwin, which uses Determinate Nix.
This is a huge hint for us.
Determinate has the strong assumption that your Nix store is an encrypted APFS volume. Which, yours isn't:
FileVault: No
Probably the most straightforward way forward is to uninstall Nix again (...sorry...) and reinstall with --determinate
to start with Determinate Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --determinate
and then it should solve itself.
...another approach is we could help you with the commands you'd need to run to enable encryption on this volume, and correctly store the secret in the keychain for Determinate to use for unlocking and mounting.
p.s. @cole-h is working right now on improving this transition, so hopefully not a lot of people will run into this problem...
Thanks! I have not had the time to reinstall yet, so I will not be able to verify if this solves the issue. I am fine with closing this issue, and I can re-open it when I reinstall if the issue persists. 🙂
I faced the same issue in Sonoma 14.4 M3 Pro. /nix
was not mounted. Manually mounting it resolved the issue
Using completely factory-resetted M3 MacBook Pro.
Manually mounting the disk works.
Kitty permission issue
Since the update I am also getting the following error when trying to start kitty.
Other Home-Manager apps start without issue.
To bypass this I start kitty from the Terminal.app, which is less than optimal.
Installation commands
Commands run on fresh macOS install are as follows:
No errors.