3 ms·
I've been trying Nix devenv[0] and nix-darwin[1] on Mac recently and having a blast. Definitely better than the stuff I had to build around Homebrew to make dev
by aequitas 4y ago
I've been trying Nix devenv[0] and nix-darwin[1] on Mac recently and having a blast. Definitely better than the stuff I had to build around Homebrew to make development environments consistent across machines. Nix-darwin even has support to install Homebrew packages.
[0] https://devenv.sh https://devenv.sh
[1] https://github.com/LnL7/nix-darwin https://github.com/LnL7/nix-darwin
- dlyons 4y agoYes, it is really great! I haven't had to run homebrew in forever; Nix + home-manager does it as part of my overall config. I've configured home-manager to both install and update homebrew packages. Did you know you can even install Mac App Store apps? Here are the relevant bits where my config does it: https://github.com/dustinlyons/nixos-config/blob/main/macos/home-manager.nix#L52 https://github.com/dustinlyons/nixos-config/blob/main/macos/...
- jonasb 4y agodevenv is super promising, but I do find it a bit intrusive that Nix creates a separate volume for its store on Mac OS
- aequitas 4y agoI was bummed out by that too initially.But it's kind of inevitable with root not writable on the latest macOS releases and needing the store to be under /nix.
- pseudalopex 4y agoThey could move the store. Like Homebrew.
- zamalek 4y agoFor anyone curious, I have a unified setup that works across my work M1 (currently bitrotting), work Ubuntu (hurrah Intune for Ubuntu!), and personal NixOS[1]. You'll probably find my mkChoose function particularly interesting[2], which makes parameterizing attrsets and lists a little easier for different hosts (I currently don't have/know a way to discriminate between Linux and NixOS, so you need to pass a function which does that[3]). If you aren't using home-manager[4] yet, I strongly recommend taking a look at it. nix-darwin significantly elevates the competency of MacOS. [1]: https://gitlab.com/jcdickinson/nix/-/tree/darwin https://gitlab.com/jcdickinson/nix/-/tree/darwin [2]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/packages/homeUtils.nix#L24 https://gitlab.com/jcdickinson/nix/-/blob/darwin/packages/ho... [3]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/flake.nix#L86 https://gitlab.com/jcdickinson/nix/-/blob/darwin/flake.nix#L... [4]: https://nix-community.github.io/home-manager/ https://nix-community.github.io/home-manager/