dustinlyons / nixos-config

General purpose Nix configuration for macOS / NixOS with starter templates + step-by-step guides ✨
BSD 3-Clause "New" or "Revised" License
1.79k stars 113 forks source link

bin/build triggers error on fresh macOS install #20

Closed zane closed 1 year ago

zane commented 1 year ago

Hi!

I tried the instructions in the README on a fresh install of macOS 13.5 on a 2022 M2 MacBook Air and ran into the following error:

% bin/build                
Requesting sudo to set homebrew tap permissions...
Starting build...
Switching to new generation...
building the system configuration...
setting up Homebrew (/opt/homebrew)...
Error: An existing /opt/homebrew/Library/Taps is in the way

Removing /opt/homebrew/Library/Taps (or even all of /opt/homebrew) seems to have no effect.

zane commented 1 year ago

The error seems to be coming from nix-homebrew here.

dustinlyons commented 1 year ago

Hmm, very strange. I was able to successfully switch to nix-homebrew on my M1 with a previous Homebrew install. This was last month; required setting the automigrate option to true.

Does the directory ever get recreated? Or does removing it continue to result in the error?

zane commented 1 year ago

Removing it will continue to result in the error in that bin/build re-creates it.

dustinlyons commented 1 year ago

Oops, okay. I think on fresh installs it was complaining that directory wasn't there, but for now I removed this. Can you try again after cleaning your Nix cache ~/.cache/nix and initializing one of the starter templates?

Or you can just drop the mkdir -p in bin/build if you don't want to go through the trouble.

zane commented 1 year ago

I appreciate the quick response, but in the interim I moved on with building a configuration from scratch. I don't have an easy way to reproduce at this point. 🙇🏻

dustinlyons commented 1 year ago

Okay, thanks for letting me know about the error!

zane commented 1 year ago

No problem! Thanks for inspiring me to get started with my own config! 🙂