Live data from Hacker News

Why I love NixOS

birkey.co

211–220 of 323 posts

Re: Why I love NixOS

#211
post #174

Earlier quoted context omitted.

It’s like saying you don’t need a version control system for coding, as you can just make a copy of your sources before making important changes.

A snapshot of your build folder. Not even the sources. This is my other problem with mainstream Distros. Extending them is completely opaque. NixOS is source based and anything and everything can be updated by the user. Need some patch from kernel ML? 1 line of code. Need a Bugfix in your IDE that hasn't landed in a release? 1 line of code. There is no distinction between package maintainers and end users. They have…

yes i think you've hit the nail on the head. I tend to view NixOS not as a distribution, but as a distribution framework. The system configuration is the sources for an immutable distribution as much as it as system configuration.

You're in no way bound by decisions of the nixpkgs contributors: as you say, we can add a patch. Or we can also decide we totally disapprove of the way they've configured such-and-such a service and write our own systemd service to run it.

Anyone can write a local debian package which adds a patch, and build and install it. And anyone can write a systemd service and use it instead of the distribution's systemd service. But on NixOS, these are equal to the rest of the system rather than outside it. Nixpkgs is just a library which your configuration uses to build a system.

Re: Why I love NixOS

#212
post #112

Earlier quoted context omitted.

As a NixOS user for 3 years, and a Claude user for 1+ year, I agree with you that it's an ideal fit. I've been very happy with, for example, how Claude can configure GNOME via dconf settings: tweaking those settings declaratively requires cross-domain knowledge and knowing where to dig. But Claude just knows. But trying to set up an environment for one of those perpetually running AIs, and asking it to refactor its o…

also the AI hallucinating nix options. I have to constantly check https://search.nixos.org/packages?channel=unstable

Try https://github.com/utensils/mcp-nixos

Re: Why I love NixOS

#213

Earlier quoted context omitted.

FWIW... I have modified packages on Fedora and installed them. The workflow is very simple... of course, not as simple as NixOS but here goes: # clone the package definition $ fedpkg clone -a $ cd # install build dependencies $ sudo dnf builddep ./nameofpackage.spec # Now add your patches or modifications # now build the package locally $ fedpkg local # install locally modified package $ sudo dnf install ./the-locall…

Arch Linux also has a long history of people writing their own package specs (AUR) and is relatively simple too of course. Let me put it differently. The documentation of NixOS treats package maintainers and users as kind of equal. This has benefits and downsides. Benefit is that everyone is treated as a power user. Downside is that power users are horrible at writing docs and this philosophy is my main theory why Ni…

Yes I just replied to your other comment with the same observation. It reminds me of an article by Paul Graham, I forget which, who expressed the difficulty of explaining to programmers who lack an abstraction just how good the abstraction is. Anything you can do with NixOS, you can do with any distribution, because it isn't magic. But somehow, more stuff becomes possible because it gives you a better way to think.

(As for why the docs are so bad, I think it's because of the lack of good canonical documentation. There's too many copies of it. Search engines ignore the canonical version because it's presented as one giant document. Parts of the system aren't documented at all and you have to work out what you've got by reading the code. The result is that you have no idea what to do if you want to improve the situation - it seems like your best option is to create new documentation. And now you have the same basic level of documentation that didn't help the first hundred times it was rewritten. And I don't really think submitting a PR to nixpkgs is exactly userfriendly, so it probably discourages people from doing the "I'm just trying to understand this, so I'll fix up the documentation as I learn something" thing.)

Re: Why I love NixOS

#214
post #55

I switched over to Nix about a year ago. I was a Windows user before that for 30 years and tried Linux a couple of times, but it never stuck. Now I know I will never touch Windows again. With NixOS I've finally found a system that actually works for me — and the full OS configuration is in a repo. My god, I love it so much. Sometimes I even prefer nix-shells over uv for quick one-off Python scripts. I cannot sufficie…

Have you heard of any good projects for running isolated containers in NixOS that are cheaply derived from your own NixOS config? Because that is what I want. I want a computer where I can basically install every non stock app in its own little world, where it thinks "huh, that is interesting, I seem to be the only app installed on this system". Basically, I want to be able to run completely unverified code off of th…

> I want a computer where I can basically install every non stock app in its own little world, where it thinks "huh, that is interesting, I seem to be the only app installed on this system".

NixOS containers are the most convenient way to do this, but those will map the entire global nix store into your container. So while only one app would be in your PATH, all other programs are still accessible in principle. From a threat-modelling perspective, this isn't usually a deal-breaker though.

There's also dockerTools, which lets you build bespoke docker/podman images from a set of nix packages. Those will have a fully self-contained and minimal set of files, at the expense of copying those files into the container image instead of just mapping them as a volume.

Re: Why I love NixOS

#215

Earlier quoted context omitted.

This feels like a very high-tech solution to a problem that doesn't really exist. Why involve an LLM to install Hyprland when "sudo dnf install hyprland" works fine? I feel like you're mistaking Nix being 'AI-ready' as a feature, when in reality, you're just forced to use an LLM because Nix is too annoying to manage manually.

The key point is that all such tweaks to the system is managed in a one configuration file. While installing Hyprland may be a one-liner, configuring it and all other services from a single entry point is incredibly liberating. Reverting changes are guaranteed to not leave behind any cruft, and you don't have to remember what you changed to make X or Y work: it's all visible in the (usually version controlled) system…

How would "bit-identical" or "free of side effects" make an actual difference in practice?

Rollback is already very easy with filesystem snapshots. Configs are already tracked by etckeeper. New laptop: either copy the whole drive or the package list and dotfiles. Also, how often do you have to get new laptops for this to be relevant ?

Re: Why I love NixOS

#216
post #99

Earlier quoted context omitted.

Ok, but I guess a more concrete version of my question is the following: > How do I set up my development environment using devenv.sh to pin nodejs to 24.14.0? If I understand your response correctly, I can't do this in any very practical way.

Generally something like languages.javascript.enable = true languages.javascript.package = pkgs.nodejs_24

But that doesn’t pin to a specific version?

Re: Why I love NixOS

#217

Earlier quoted context omitted.

I love my kitchen knife and I love Emacs. More love is a good thing. Unless you're the kind of person who thinks not loving is better because you've got nothing to lose.

To me, loving inanimate "trivial" things diminishes the value of love. I love my girlfriend and my pets. I like my kitchen knife and my car. To bunch up both into the same category confuses things into "which one do I love the most", some sort of spectrum of love. In the case of a fire, I'm sure you wouldn't prioritize your laptop with NixOS over your cat (let's imagine that the only backup is in the house that's on…

No, you don't have to rank things, there's your mistake. Stop ranking things.

Re: Why I love NixOS

#218

The author almost touches on the one more topic that I adore about Nix, but ends up just so missing it: NixOS is absolutely incredible for its ability to be configured through AI tooling. And I don't mean that it's better than other operating systems, I mean that it's the only game in town. I've been using Nix, both the package manager and the operating system, for years by now. I agree with all of the author's point…

There's also GUIX.

Re: Why I love NixOS

#219
post #210

Earlier quoted context omitted.

This feels like a very high-tech solution to a problem that doesn't really exist. Why involve an LLM to install Hyprland when "sudo dnf install hyprland" works fine? I feel like you're mistaking Nix being 'AI-ready' as a feature, when in reality, you're just forced to use an LLM because Nix is too annoying to manage manually.

[flagged]

That would be Ubuntu and Docker. With Guix you can set everything for under a config.scm file in a reproducible way, you can even export a guix recipe as a Docker container, appimage or even as a standalone package for non-guix systems. That's unvaluable for scientific environments where the contrainsts must be set inmutable and unchanging.

But keep bitching about obsolete barely-GNU/Linux distros (the don't even use Linux-Libre) made to copycat NT with the registry, svchost.exe, MSI packages, DISM. (Gnome/OSTree/SystemD/Flatpak). Aka IBM's attempt to pick up RedHat and create another AIX but leeching everything from the community.

With Guix you can even crosscompile and export software to Win32 (for instance, Icecat, VLC...) and you don't need to nasty incantations with flatpaks.

If you want to live in 1993, go on. I already moved past Unix with 9front (my main machine, a n270 netbook, I code in C for expersite, rc/AWK for automation and EForth for fun) and Guix (sadly non-Guix because of wireless until I can afford a compatible laptop with ath9k and Intel).

9front it's my 'brain detox' machine, it's not Unix, it's even simpler than Unix. No wayland, no flatpak, no crap. Build once, run it again as it's a static binary. Guix it's to deal with corporate crap because of $JOB. You know, today they requiere docker and similar crap and with a guix environment I'm free to deploy at home everything at want.

For Go code I can just use 9front modulo some expecial cases (Yggdrasil-go needs a tun/tap interface, but with 9front you can just open() /net/ether/ files and you are free to inject whatever you want.

Re: Why I love NixOS

#220
post #116

I feel the same way about Guix with nonguix channel enabled. NixOS is awesome but I prefer Guile to Nix's language and I enjoy the docs more. But definitely sister OSes.

There's nowhere near enough love for Guix. I don't understand it. It has far better foundations. I would never invest time into some "config language". Using a real programming language has huge benefits, and it's a good one (Scheme).

It also has very slow rebuild times.
Post reply on HN