Something not mentioned here is that each and every single macOS update will break your Nix install too. This is, by far, the most frustrating part of using Nix on macOS.
Does anyone know if this update was a fluke?
41–50 of 116 posts
Something not mentioned here is that each and every single macOS update will break your Nix install too. This is, by far, the most frustrating part of using Nix on macOS.
Does anyone know if this update was a fluke?
That seems like a hell of a lot more work than just using Home-Manager and flakes. Flakes add a lot of boilerplate, but this seems excessive in comparison. And Home-Manager is quite easy.
This blog post follows IanTheHenry's method for declarative environments via nix-env, which was produced when Ian was following a methodology for learning Nix that deliberately eschewed engagement with the Nix community in favor of relying only on the official documentation. So it doesn't use flakes or any unofficial community tools that could make setup 'easier' in the sense of being a bit more ready-made. Anyway I…
Something not mentioned here is that each and every single macOS update will break your Nix install too. This is, by far, the most frustrating part of using Nix on macOS.
Earlier quoted context omitted.
Totally, this post is doing a disservice to Nix.
I think that's a bit unfair to the author, whose goal is clearly to document their own setup on a didactic way rather than to say > here, paste this into your terminal for the easiest way to get up and running with Nix in a fashion that's representative of community common practices I think it's a good blog post which, carefully read, teaches lots of useful things about Nix in a pretty concise way. It's totally fair…
If the audience was Nix users, then it would be different.
It's kinda like if you bought a fancy new camera and demonstrated your process but all your photos were out of focus, framed badly and lit poorly because you're into that for some reason. Would fellow fancy new camera enthusiasts cheer? Would folks who don't know about your fancy new camera think it's a good camera?
For folks unfamiliar with Nix, this is a fairly atypical and complicated setup. It's honestly pretty smooth sailing normally.
> Usually, your terminal emulator will create a login shell by default when you open a new terminal window. (Apple Terminal and iTerm2 both do.) And that’s generally the only time you create a login shell. On a Linux system, login shells are only invoked when you actually create a new session which doesn't come from an existing session belonging to the same user. In other words, you get the when - you switch to a 're…
> Usually, your terminal emulator will create a login shell by default when you open a new terminal window. (Apple Terminal and iTerm2 both do.) And that’s generally the only time you create a login shell. On a Linux system, login shells are only invoked when you actually create a new session which doesn't come from an existing session belonging to the same user. In other words, you get the when - you switch to a 're…
Earlier quoted context omitted.
I suppose you could , but Nix (and NixOS) defaults to keeping packages for an insane amount of time. 3 months of regular Nix use can accrue ~300gb of packages, which is definitely not what you'd have on something like Homebrew.
Does nix and NixOS ever run the GC for you? I’ve always found that I have to manually run it at a time and place of my choosing.
Perhaps what is missing is the book "Nix - The good parts". Not saying Nix is not good overall, but getting a condensed description what is worth knowing, leaving out what can be ignored or is obsolete, would be quite valuable.
- don't use nix-env ever
- enable and use the new nix command (nix3)
- enable and use flakes
- use home-manager
- if on macOS, use nix-darwin
- with flakes, freely use nixpkgs unstable (stable is still useful, but flakes provide their own stability through pinned versions).