Getting new Mac (M2 Air) in ~a week. Dislike tools that install all over filesys and may not be confined. What "good hygiene" practices do you use? I tried Parallels; too resource-intensive and clunky. Docker doesn't help w/ Mac apps. Accounts seem like a pain. What else?
Conversation
I went down the nixpkgs + nix-darwin + home-manager route, with direnv for project-specific setups. I won't sugar-coat it: the learning curve for nix is exceedingly steep (in dire need of improvements to the learning resources and UX), but my system is now a whole lot tidier now.
1
10
It's important to stress that you should treat it as bleeding edge tech. There's lots of duct-tape holding it all together (forcing the incredibly stateful software ecosystem into a pure DAG), but the stuff I have learned has been been pretty useful to me at least.
1
4
As a heads-up, there is some pain when building native binaries locally that you might want to distribute to other people, especially if you need to worry about dynamic linking. Often this stuff is done on CI/CD these days but I thought I'd mention it.
1
2
The issue with dynamic linking is that binaries you build locally might link to the nix store. If you want to relocate those binaries to other systems you'd need to rewrite those links to a conventional location. While not a *huge* problem I thought I'd give the heads-up in case.
1
Hah, we actually had an explicit "de-Nix-ify" step in the Lean 4 CI before switching to a custom compiler toolchain github.com/leanprover/lea
...strangely I was never yelled at for committing this crime
2
2
Seems ok to me! What do you do now?
1
See the file below in the link, we gather and distribute every single system and non-system dependency to ship a completely self-contained toolchain, then use it to compile Lean itself. No more Nix-wrapped compilers involved.
1
2


