DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs.
https://determinate.systems
GNU Lesser General Public License v2.1
2.19k stars 57 forks source link

/nix does not mount after upgrading to macOS 15.1 #1261

Open grebban-yamashita opened 1 day ago

grebban-yamashita commented 1 day ago

Using completely factory-resetted M3 MacBook Pro.

$ sudo cat /etc/synthetic.conf
run private/var/run
nix
$ cat /etc/fstab  

# nix-installer created volume labelled `Nix Store`
UUID=8474bf18-8044-4acc-b351-f8c214502e41 /nix apfs rw,noauto,nobrowse,suid,owners

Manually mounting the disk works.

Kitty permission issue

Since the update I am also getting the following error when trying to start kitty.
Screenshot 2024-10-30 at 9 00 46 AM

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:

$ cat nix-master/install.sh 
#!/bin/sh

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install

xcode-select --install

. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

nix run nix-darwin -- switch --flake .#work

No errors.

cole-h commented 1 day 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?

grebban-yamashita commented 15 hours ago
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.
cole-h commented 7 hours ago

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?

grebban-yamashita commented 5 hours ago

Two sh services are present, and enabled by default.

Screenshot 2024-10-31 at 5 36 15 PM

Clicking the icon next to them just shows the path to /bin/sh

cole-h commented 4 hours ago

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*?