Live data from Hacker News

Why I love NixOS

birkey.co

121–130 of 323 posts

Re: Why I love NixOS

#121

Earlier quoted context omitted.

I would have never become a power user of Linux were I used LLM to do the installation of Gentoo once upon a time. :( So do you guys not know much about the distro you are using, or how does this work? I honestly thought your comment was sarcasm, but apparently it is not.

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 puts another abstraction between me and the software I'm using.

Re: Why I love NixOS

#122

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…

That's a solid point.

I knew my flake setup could be better but never bothered. Then one day earlier this year I threw Claude at it. Not only did it improve everything, it fixed a small bug that had been bothering me.

My confidence in doing this came from exactly what you said: If it blows everything up I can just rollback.

Re: Why I love NixOS

#123
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.

+1. I would also recommend using Github search to look for existing examples.

Re: Why I love NixOS

#124
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…

It is a more user friendly abstraction on top of Nix. Most people don’t want or need to understand the specifics of Nix or the Nix language.

Btw, I say this as a huge fan and heavy user of both Nix and NixOS.

Re: Why I love NixOS

#125

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

Already exists, although I don’t know how well maintained it is: https://github.com/henrysipp/omarchy-nix

Personally, I don’t see the need for this with NixOS. Setting aside the fact that Omarchy is way too opinionated (Basecamp installed by default?), NixOS is already quite composable, so you can easily build a well-formed experience out of isolated NixOS modules.

Re: Why I love NixOS

#126

Earlier quoted context omitted.

Kind of an interesting thing here where if this is how you view it, it kind shows in itself why you don't actually need it. Like what is ultimately the difference here for you vs a non-nix user who, as author says, is just dealing with some big ambiguous pile of state? It kind of takes away any upside to using nix, and probably just creates more friction for your AI than just running ubuntu/apt stuff. The idea is you…

The upside of Nix config is that it's the state of my system in a declarative config file. I have these packages installed and these firewall settings and these users with these permissions and this folder served over Samba and these hotkeys that do these things and these Obsidian vaults synced over SyncThing and these devices in my SyncThing network and Neovim installed with these plugins and ... This is difference…

But if you are not reading or comprehending the config file, why does it make any difference? You ask AI to purge ffmpeg from your system, it will probably know more about doing that with apt than with nix, right? And if the input on your end is "remove ffmpeg from my system" or whatever either way, what's the need for nix? You will be much happier just editing /etc files and such in the standard way, rather than hoping your AI knows the (sometimes sadly inconsistent) way nixos handles the particular module/service/whatever you are dealing with.

Re: Why I love NixOS

#127

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…

Sometimes it's nice to throw an LLM at some Nix stuff but I find that unless you're comfortable with the Nix language itself and have spent a tiny amount of time writing a derivation you might introduce quite a few footguns along the way. That said these days when I need a development flake I just point a LLM at the repo and it mostly figures out what's needed. It's just that Nix lends itself pretty well (sadly) to poking around in the dark (yes, I know about the REPL).

Re: Why I love NixOS

#128

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…

Wouldn’t any immutable OS accomplish this goal?

Re: Why I love NixOS

#129

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 waited for AI to get better before adopting Nix as it seemed to be rather arcane, a bit like Arch Linux, and I was worried I wouldn’t have the time for it. In preparation I shifted my development environments entirely to docker scripts where I can copy and paste working snippets from the internet.

Nix and AI is a match made in heaven and I think we’re going to see a lot of good software that’s amenable for us by AI that is both cheaper to build and easier to use.

Re: Why I love NixOS

#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 WM and DE test environments.

And the thing is that, now that I have everything set up the way I want, I don't really have to DO anything to keep the system running, other than occasionally update (I'm on unstable, so I do that manually).

Could I turn Claude loose on my .config directory, give it access to apt or dnf (etc.), and let it set up a non-NixOS environment for me? Probably, and it would probably work reasonably well, but I wouldn't trust it the way I trust NixOS.

Post reply on HN