Stream: nix

Topic: macOS Sequoia


view this post on Zulip Srid (Jun 11 2024 at 17:55):

I just upgraded to macOS Sequoia 15 beta, and had to do the following to make Nix work (I already use nix-darwin and home-manager):

view this post on Zulip Srid (Jun 11 2024 at 17:55):

Incidentally, nix is no longer in $PATH for me; I did locate it at /nix/var/nix/profiles/system/sw/bin/nix

view this post on Zulip Srid (Jun 11 2024 at 18:09):

Well, not yet!

❯ /nix/var/nix/profiles/system/sw/bin/nix run
error: the user '_nixbld1' in the group 'nixbld' does not exist

cf.

view this post on Zulip Srid (Jun 11 2024 at 18:24):

I had to re-install Nix, while using the new GID/UID:

# Get ID of nixbld group
$ dscl . -read /Groups/nixbld | awk '($1 == "PrimaryGroupID:") { print $2 }'

# Find the ID of base nixbld user
$ dscacheutil -q user  | less

# Uninstall, after making sure no programs from nix store are running
$ sudo /nix/nix-installer uninstall

# Install afresh, using the new GID/UID
$  curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install \
    --nix-build-group-id 30000 --nix-build-user-id-base 305

view this post on Zulip Srid (Jun 11 2024 at 18:28):

Now I get,

error: unable to download 'https://cache.nixos.org/jnzj0r0jpmx0qp913riqpizvzidrqcfi.narinfo': Problem with the SSL CA cert (path? access rights?) (77)

To fix it,

sudo rm /etc/ssl/certs/ca-certificates.crt
sudo ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt

Ref: https://github.com/NixOS/nix/issues/2899#issuecomment-1669501326

view this post on Zulip Srid (Jun 11 2024 at 18:37):

nix-darwin activation fails,

image.png

view this post on Zulip Srid (Jun 11 2024 at 18:38):

Which is fine; just rename it as it tell you.

view this post on Zulip Srid (Jun 11 2024 at 18:38):

Now home-manager part complaints:

Starting Home Manager activation
The previous generation number and path are in conflict! These
must be either both empty or both set but are now set to

    '42' and ''

If you don't mind losing previous profile generations then
the easiest solution is probably to run

   rm /Users/srid/.local/state/nix/profiles/home-manager*
   rm /Users/srid/.local/state/home-manager/gcroots/current-home

and trying home-manager switch again. Good luck!
srid@appreciate nixos-config %

view this post on Zulip Srid (Jun 11 2024 at 18:39):

Just ran those two rm commands; now:

Starting Home Manager activation
Activating checkFilesChanged
Activating checkLaunchAgents
Existing file '/Users/srid/Library/LaunchAgents/org.nix-community.home.nix-gc.plist' is in the way of '/nix/store/zkh0jhdbba409065s1rwxfqlq4016x0n-home-manager-agents/org.nix-community.home.nix-gc.plist'

view this post on Zulip Srid (Jun 11 2024 at 18:40):

Remove /Users/srid/Library/LaunchAgents/org.nix-community.home.nix-gc.plist and activate again. Now,

Activating setupLaunchAgents
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.

view this post on Zulip Srid (Jun 11 2024 at 18:40):

Strangely, re-running activation (nix run on srid/nixos-config) worked.

view this post on Zulip Srid (Jun 11 2024 at 18:41):

My home-manager installed apps, like Rio terminal, are now accessible from Raycast :+1:

view this post on Zulip Srid (Jun 11 2024 at 18:43):

nix-health is happy:

❯ nix-health
🩺️ Checking the health of your Nix setup (aarch64-darwin on nix-darwin):
βœ… Rosetta Not Active
   apple emulation = None
βœ… Minimum Nix Version
   nix version = 2.18.2
βœ… Flakes Enabled
   experimental-features = flakes nix-command repl-flake
βœ… Disk Space
   min disk space = 1024.0 GB; total = 4.0 TB
βœ… Max Jobs
   max-jobs = 10
βœ… Nix Caches in use
   substituters = https://cache.nixos.org/
βœ… Trusted Users
   trusted-users = github-runner root srid
βœ… Direnv installation
   direnv location = Some("/etc/profiles/per-user/srid/bin/direnv")
βœ… All checks passed

view this post on Zulip Srid (Sep 13 2024 at 16:25):

https://github.com/DeterminateSystems/nix-installer/releases/tag/v0.26.0

view this post on Zulip Shivaraj B H (Sep 25 2024 at 09:57):

Also see: https://determinate.systems/posts/nix-support-for-macos-sequoia/

view this post on Zulip Srid (Sep 25 2024 at 21:23):

I had to run that command when updating nix-darwin


Last updated: Nov 15 2024 at 11:45 UTC