Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's needed for Catalina? #166

Closed
dhess opened this issue Oct 8, 2019 · 12 comments
Closed

What's needed for Catalina? #166

dhess opened this issue Oct 8, 2019 · 12 comments

Comments

@dhess
Copy link
Contributor

dhess commented Oct 8, 2019

What's required to get nix-darwin working with Catalina? Here, I mean just nix-darwin-specific issues, not the nixpkgs issues as discussed in NixOS/nix#2925

In #nix-darwin on Freenode, user cransom suggested that a /run entry in synthetic.conf is needed. Also, he claims that synthetic.conf requires hard tabs, rather than spaces.

Any other issues? Let's catalogue them here.

@mroi
Copy link

mroi commented Oct 8, 2019

Any details as to why /run is needed? It was not needed before Catalina.

Apart from the setup problems in NixOS/nix#2925, I don’t have any issues with my Nix setup on Catalina.

Edit: Stupid me. This project is not about ordinary Catalina. Forget what I said.

@dhess
Copy link
Contributor Author

dhess commented Oct 8, 2019

nix-darwin has relied on /run since I've been using it. Just grep the source tree for numerous examples of where and how it's used.

@dhess
Copy link
Contributor Author

dhess commented Oct 8, 2019

This seems relevant:

NixOS/nix#3125

@alanpearce
Copy link

alanpearce commented Oct 8, 2019

I added a line to /etc/synthetic.conf after following the instructions for nix like so:

run	/System/Volumes/Data/private/var/run/

I don't know if it's the correct destination, I just know it should be private/var/run from some $PWD, based upon this:

sudo ln -sfn private/var/run /run

After a reboot, the installer worked, I'm just encountering some build issues switching to my real configuration.

@LnL7
Copy link
Owner

LnL7 commented Oct 8, 2019

The main reason for using /run was consistency with nixos, it isn't strictly necessary and could be moved or even made configurable if needed.

@steshaw
Copy link

steshaw commented Oct 18, 2019

I added a line to /etc/synthetic.conf after following the instructions for nix like so:

run	/System/Volumes/Data/private/var/run/

Yep, looks like that works.

I don't know if it's the correct destination, I just know it should be private/var/run from some $PWD, based upon this:

sudo ln -sfn private/var/run /run

It seems that putting a relative directory into synthetic.conf works fine too:

run	/System/Volumes/Data/private/var/run/

man synthetic.conf states:

synthetic.conf describes virtual symbolic links and empty directories to be created at the root mount point

The installer (and docs for manual installation) could use:

printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf

However, that does require a reboot, so if nix-darwin can be changed to use /private/var/run directly, maybe that's the way to go?

@dhess
Copy link
Contributor Author

dhess commented Oct 20, 2019

fonts.enableFontDir fails on Catalina because the Nix store is now on a separate filesystem.

@srid
Copy link

srid commented Nov 17, 2019

Installation of nix-darwin is currently broken on Catalina:

error: the path '/nix' is a symlink; this is not allowed for the Nix store and its parent directories

@cmacrae
Copy link
Contributor

cmacrae commented Nov 26, 2019

@srid You can mitigate this by setting NIX_IGNORE_SYMLINK_STORE=1 🙃

@LnL7
Copy link
Owner

LnL7 commented Nov 26, 2019

Yeah, the nix build from my installer branch will get overwritten with pkgs.nix by default.

@ashkan-leo
Copy link

I finally was able to install nix on Catalina.
I tried to install nix-darwin, but I have issues creating /run. I added run /System/Volumes/Data/private/var/run/ to /etc/synthetic.conf, but I'm still unable to create /run.

I used the script in NixOS/nix#3212 to install Nix (script is authored by @LnL7). Any chance a similar approach can be taken here?

@LnL7
Copy link
Owner

LnL7 commented Mar 18, 2020

Yeah, except in this case a symlink is fine and was already the default in the installer.

echo "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B

@LnL7 LnL7 closed this as completed in 80a8a59 Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants