Live data from Hacker News

Why I love NixOS

birkey.co

261–270 of 323 posts

Re: Why I love NixOS

#261
post #216

Earlier quoted context omitted.

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

But that doesn’t pin to a specific version?

It does, but its implicit (and so may not be the exact patch version you have in mind). See my other comment for how to handle if you _do actually care_ about pinning to a specific version explicitly.

Re: Why I love NixOS

#262
post #4

Although I’ve never committed to using nix system-wide, I do enjoy nix-based using https://devenv.sh/ for the very reasons described in the article. It’s much easier than local containers for development.

Can you help me understand why devenv is needed instead of a shell like this/what is gained? { pkgs }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ # build tools cmake ninja gnumake pkg-config ]; buildInputs = with pkgs; [ # java jdk8 # compilers gcc clang llvmPackages.libcxx # libraries capstone icu openssl_3 libusb1 libftdi zlib # scripting (python3.withPackages (ps: with ps; [ requests pyelftools ])) ]; # capst…

The UX is the big benefit, especially on teams who may not even know what nix is. I held off on exposing my nix setups for a long time, but devenv has made it possible to check things in without losing a ton of time to tech support.

Re: Why I love NixOS

#263

Most people who try Nix either quit in the first week or never go back to anything else. There is no in between.

I'm the inbetween. I stuck with it for a couple of months, but ended up dropping it. It's just too slow and incurs a massive complexity penalty that I'm not happy about. I'd rather just deal with tarball rootfses and union mounts if I want an immutable system (and overwhelmingly I do not.) The reproducible builds are nice and all, but I'm not in a position to really take advantage of it. I'm sure Nix is killer for a modern sysadmin.

I'd much prefer just Plan 9. WORM filesystem and first-class namespaces.

Re: Why I love NixOS

#264
post #216

Earlier quoted context omitted.

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

But that doesn’t pin to a specific version?

It does, in combination with a pinned nixpkgs commit, which you can find like this:

    ~/repos/nixpkgs$ git log --grep='nodejs.* 24.14.0' -1 origin/master
    commit 9c0e2056b3c16190aafe67e4d29e530fc1f8c7c7
    Merge: d3a4e93b79c9 0873aea2d0da
    Date:   Tue Feb 24 16:53:40 2026 +0000
    
        nodejs_24: 24.13.1 -> 24.14.0 (#493691)
    ~/repos/nixpkgs$ nix eval nixpkgs/9c0e2056b3c16190aafe67e4d29e530fc1f8c7c7#nodejs_24.version
    "24.14.0"
    ~/repos/nixpkgs$

Re: Why I love NixOS

#265
post #204

Earlier quoted context omitted.

> Something that happens in 4.5k lines twice is hardly rare. Provided you don't consider the context, sure. One of them is software with buggy tests, the other is one that provides a custom test suite that basically has to be reimplemented in the package definition. How often do you think either of those things happen?

Looking at a lot of nix package expression: Quite a bit. Besides, just taking a way a single brace gives 7 hits. Still a ridiculous level of nesting. So I don't go with your reasoning that these are some kind of super special cases. If something happens so often in 4500 lines of code you cease the right to claim it is special.

It happens 1/2290 (0.04%) of the time. You are significantly more likely to guess a stranger's birthday totally at random (0.27%) twice in a row (0.07%). If you don't consider that exceedingly rare, then you and I need to hit up Vegas immediately.

You are projecting a programming style onto Lisps that's quite alien to them. Lisps tend towards small, discrete functions that are composed together. It is the ordinary languages that tend towards deep branching and nesting; Lisps generally favour recursion and function composition instead.

Re: Why I love NixOS

#266

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…

I would just like to give this a big ol’ +1. I did not like Nix when I started. The ergonomics are hard to get around, but the power is honestly hard to overstate.

Coding agents actually help with a lot of the ergonomic issues. If you have an evaluation issue, it can be annoying to climb into nixpkgs to diagnose it. But codex will do that for you.

I’ve found agenix in particular to be really great addition for agents: secrets you can copy around without risk of accidental disclosure.

In a day I can now deploy Caddy, Authentik, Fleet, Headscale, Stalwart, jmap-webmail, Forgejo, SFTPGo, Immich, Grafana, Jaeger, PostHog, etc. and have them all work together. I can do this on a tiny VPS, and codex can actually estimate and test performance to minimize cost.

The equivalent Kubernetes setup wastes so much on isolation and a scheduler that is overkill for anything small.

Re: Why I love NixOS

#267
post #61

NixOS is great. Nix the language is just awful. I still use it for my Dev laptop and for Home Manager on all my devices.

There are so many people complaining about the Nix language while offering zero constructive criticism. I was a little skeptical about them using a custom language at first. But then as I used it more it grew on me and I understand why it is the way it is.

People just seem to want to complain because it doesn't look like any of their favorite languages and they aren't familiar with functional languages. At this point, I can't imagine using any other language in place of Nix. The code would have so much noise and be much harder to read.

Re: Why I love NixOS

#268
Nix is a really good good good approach to manage packages. I've configured an entire asahi setup with for my m2 and can't be happier. It's not without it's quirks and nixlang itself is a bit cumbersome to express what you want.

However, AI is a great fit to write flakes. You can easily understand the generated code and it gives a power to "review" the changes before applying them.

And while nixos is amazing, I think nixpkgs are a bit overhyped; I've encountered many packages that are abandoned and outdated.

I can share my configs if anyone is interested.

Re: Why I love NixOS

#269
post #13

doesn't it use up a lot of disk space compared to other distros because of the way everything is set up?

Yes, but you can also reclaim your space. I've configured nix to only store two latest revisions and have a ./switch.sh file that automatically clears everything up after applying nix.

I had issues when giving boot partition only 512mb, so I'd recommend going with 1G.

Re: Why I love NixOS

#270

What I'd like to see is Omarchy implemented via the Nix package manager. (Seems like a good project for AI, actually.)

You can point AI to omarchy repo and have it generate a plan and them implement step by step.

My entire config is almost "omarchy", at least visually with hyprland and some other packages.

Post reply on HN