Live data from Hacker News

Why I love NixOS

birkey.co

151–160 of 323 posts

Re: Why I love NixOS

#151
post #83

Earlier quoted context omitted.

It reads almost the exact same as any functional C-style language. Not to mention that specifically for Guix, you're going to be writing the (name value) form for 99% of it.

I don't agree at all. Just look at these derivations: https://codeberg.org/guix/guix/src/branch/master/gnu/package... I counted and you regularly see this: "))))))))))" at the end. This is not a language that is optimizing for being written by humans.

> This is not a language that is optimizing for being written by humans

I've taken a look at the code - having never written a line of Guix in my life - and it seems very readable to me. It's cleanly structured and makes good use of indentation.

The string "))))))))))", which you claim you're seeing 'regularly', appears exactly twice in 4,580 lines of code. It's the longest parens string that appears in the file. Seems to me like you deliberately searched for the most atypical example, that you're now misrepresenting as 'regular', when it is highly atypical.

And honestly, what would that look like in some 'more normal' language?

              );
            }
          );
        ];
      };
    )()();
Better?

I will never understand this fear response some people have to seeing `(fn a b)` instead of `fn(a, b)`.

Re: Why I love NixOS

#152
post #93
post #38

Earlier quoted context omitted.

ChatGPT is very good at pulling it together to give you working code. Not on the first try, but on the third try it usually works.

Pasting the generally horrible error messages is also quite effective!

Pasting? Give Claude/codex the ability to go fix it itself and have it deal with it directly.

Re: Why I love NixOS

#153
post #139

Earlier quoted context omitted.

You know, I used to agree, but what I realized, is I am a software engineer, and I'm used to working in large projects with source-code as the only documentation. And that's what's great about NixOS, you just clone nixpkgs and treat it like any other underdocumented software you might work on.

> I'm used to working in large projects with source-code as the only documentation. As a software engineer I have an opposing attitude towards this. I work on projects with terrible documentation because somebody pays me to do so or there is a significant potential that I can unlock. There are significant alternatives to NixOS like bootable containers and OSTree which are more useful and better documented. If Nix pro…

> I work on projects with terrible documentation because somebody pays me to do so or there is a significant potential that I can unlock.

I mean, I'd argue there is significant potential, but really, for me it's just easy because I've been doing it for 20 years, and documentation is always fundamentally worse than code in some important ways.

> If Nix project really cares about being competitive and adopt users, they have to document their stuff.

This is one of the good/bad things about OSS.. most users don't provide positive value to the project. So do they really want to adopt users? Shrugs but the project is certainly competitive.

Re: Why I love NixOS

#154
post #32

I'd love NixOS more if they had any decent documentation. Everything seems scattered around a dozen forums, a hundred old blog posts, and a thousand issues of "this work on my machine (3 releases ago)".

You know, I used to agree, but what I realized, is I am a software engineer, and I'm used to working in large projects with source-code as the only documentation. And that's what's great about NixOS, you just clone nixpkgs and treat it like any other underdocumented software you might work on.

And actually to add, I've been finding myself going to nixpkgs first for reference on how to build and/or configure packages even outside of nix.

Re: Why I love NixOS

#155

Earlier quoted context omitted.

NixOS is high-level declarative, so you're reading high-level config diffs when the AI agent is pitching changes. Unless you're brand new to Linux or computing, it's not a mystery what a given nix config change is ever doing. You can probably guess what this does: networking.firewall.allowedTCPPorts = [ 8080, 9000 ]; The things to know about the OS are high level things. The rest of its idiosyncrasies you learn just…

Coming from Ansible with hand-written config templates this was honestly a friction point for me - I felt like NixOS is trying to actively hide what it's actually going to configure. It's gotten better now that I read some nixpkg service sources but from time to time I still feel the urge to just directly manage my systemd units, sshd configs and whatnot. Like, sure it simplifies the setup but at the same time also p…

I agree with the many levels of abstraction, but at the same time, directly managing systemd units is also so much easier with Nix then any other distro I've tried.

Re: Why I love NixOS

#156

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

This is a simple reflection of the fact that Nix has a steep learning curve. People who persist generally have deep-enough interest or a compelling-enough use case to power through.

I feel like it's more of an indictment than praise; it implies Nix is relatively inaccessible to interested but time-constrained dabblers, which puts a hard cap on Nix's ability to outgrow its niche.

Re: Why I love NixOS

#157
post #130

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 literally just fixed a couple of nagging config issues that I couldn't be bothered to find in my (admittedly complex) set of NixOS and HM config files by asking Claude to find and fix them. I had Claude do the grunt work of shifting parts of my config to a new structure I started but didn't have time to fully implement. Based on examples I provided, I had Claude use specialisations to set up a couple of different W…

NixOS's greatest weakness historically has been bad/missing docs, especially docs of the "I have X how do I do Y?" nature. This led to a situation where thousands of users asked those questions on forums and received answers covering a spectrum of possible paths forward. The other path was to spend a bunch of time trolling through module sources to find the options you need and understand what they were going to do and how they would interact with each other.

Anyway, it turns out this is a perfect setup for an AI bot to step in: it's got all those forum posts to learn from and it's endlessly patient when it comes to just figuring everything out from the source code.

Re: Why I love NixOS

#158

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…

It's unreal. I've packaged so many super daunting packages that would take myself weeks to package (and some that I've tried and failed to package). I have 6 years of daily driving nixos...So I'm not exactly new to the distro. Even messing with stdenv or language builders is trivialized. Any software that I want, I can get within a few hours of claude/codex just spinning unsupervised. It's so nice! Underrated for sur…

And if you watch what it's actually doing during a session like that, it's basically exactly what a human would do: run the build, find the error, google the error, consider 2-3 possible fixes, pick one and apply it, repeat. Afterward, look at the various patches and fixups and decide if a refactor is necessary.

Re: Why I love NixOS

#159

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…

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.
Post reply on HN