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
):
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist && sudo launchctl kickstart -k system/org.nixos.nix-daemon
to start the Nix daemon.Incidentally, nix
is no longer in $PATH for me; I did locate it at /nix/var/nix/profiles/system/sw/bin/nix
Well, not yet!
β― /nix/var/nix/profiles/system/sw/bin/nix run
error: the user '_nixbld1' in the group 'nixbld' does not exist
cf.
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
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
nix-darwin activation fails,
Which is fine; just rename it as it tell you.
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 %
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'
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.
Strangely, re-running activation (nix run
on srid/nixos-config) worked.
My home-manager installed apps, like Rio terminal, are now accessible from Raycast :+1:
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
https://github.com/DeterminateSystems/nix-installer/releases/tag/v0.26.0
Also see: https://determinate.systems/posts/nix-support-for-macos-sequoia/
I had to run that command when updating nix-darwin
Last updated: Nov 15 2024 at 11:45 UTC