Live data from Hacker News

Why I love NixOS

birkey.co

291–300 of 323 posts

Re: Why I love NixOS

#291
post #108

I've recently switched to nix as a way to encode my environment across my server and work / private devices a bit more than just having some Brewfiles. I know it's not worth it for the computer switch every few years but having a somewhat opinionated place to centralize my config is worth it over regular dot files. My first impression after a week of using: - I really dislike the complexity of terraform, and this is…

I really want to like NixOS (and I mostly do) but the weirdness of the split between NixOS and HomeManager (and the fact that without HomeManager, you need another solution to manage your user-level configs) made it come up a bit short for me.

Re: Why I love NixOS

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

I was already happy with my big ball of nix config for various servers, but claude does shave off a bunch of rough edges and make it more pleasant to interact with. I also resolved a couple nagging issues that had been around for a while.

It does tend to hallucinate but thats the great thing about nix... if it builds its probably right!

Re: Why I love NixOS

#293

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'm not sure how I would've configured my dotfiles without AI. The nix syntax is a bit daunting, but the rollback feature makes me feel confident in modifying my system agentically. The main setbacks are the non-fhs filesystem, which both applications and agents generally expect.

Just a note that if you are on nixOS you can configure things to run in an FHS compatible wrapper (https://ryantm.github.io/nixpkgs/builders/special/fhs-enviro...)

Re: Why I love NixOS

#294

Earlier quoted context omitted.

That's hard given most apps have dependencies and often share them. It will always look like curl is available or bash or something What's wrong with another user account for such isolation? They can be isolated to namespaces and cgroups. Docker and Nix are just wrappers around a lot of OS functionality with their own semantics attempting to describe how their abstraction works. Every OS already ships with tools for…

> Nix is just another chef, ansible, cfengine, apt, pacman No, because Nix code is actually composable. These other tools aren't.

Not only is it composable, but it is generalizable. So yes there is also chef, ansible, apt, uv, nodeenv, etc... or there is just nix. It is able to be the "one tool" to rule them all, often with better reproducibility guarantees.

Re: Why I love NixOS

#295

Earlier quoted context omitted.

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

I've been trying to get nixd LSP to work with Claude Code but I got stuck as they gatekeep it behind their "plugin" system and you can't just configure it in settings.json to point to a nix store path like mcps :(

My usual solution is to just clone whatever I need. e.g. in this case just clone nixpkgs and put in your instructions that it should do a git pull to make sure it's up to date and then refer to that whenever doing anything with nix. Agents are really good at using grep to explore repos even for something completely internal. Then you don't need any config or special tools. e.g. for work I just have a directory with like 30 repos cloned and my base AGENTS file I use says to refer to either them or live system state for ground truth. I basically never encounter hallucinations.

Same goes for the harness itself. Want to know how Codex works or whether it can be configured in some way? Clone it and ask it to look at itself.

Re: Why I love NixOS

#296
post #139

Earlier quoted context omitted.

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

> for me it's just easy because I've been doing it for 20 years

C’mon, just drop the “greybeard” act. Nix not having proper documentation is bad practice, period. No ifs buts or howevers, it’s just an objective fact. Good documentation is always (ALWAYS) a net positive, and this is an OS with it’s own unique mindset and way of doing things, good documentation is essential. End of.

Re: Why I love NixOS

#297

I tried NixOS a few months ago, when I had to choose a new OS for my laptop. On the one hand, it's great, as so many others here and TFA have attested. Declaratively specifying your system configuration and using snapshots to keep track of everything is a complete game-changer. Similarly great is the absolutely huge universe of installable packages. The coverage here is so much better than what's on offer from Ubuntu…

Sibling comment does a good job of going into flakes, but to answer this

> Do you install a package or a service

A package is like the raw software installation. So eg the bash package is just a wrapper around building bash from source (theoretically from source at least... you can also define a package as being a binary distribution as long as you specify the content hash). The service (actually the _module_) is for everything else around software installation. So, eg, the bash _package_ will build bash and have it available for you to put in your path but the bash _module_ might also configure your .bashrc and set it up as your users shell. It would also generally refer to the bash _package_ so you can do all that plumbing but specify a certain version of bash you want to use.

Another common example: a plex package would again build the plex software but a plex module would perhaps create a plex user, setup systemd units, open your firewall, and create a media directory.

EDIT: the next layer of confusion is that modules (which sort of are a secret-sauce of nix and so naturally you will want to use them a bunch) are specific implementation details of multiple subsystems in nix. Meaning, nixOS and home-manager and nix-darwin all have "modules" but they are not compatible. Each has its own "idea" of what modules are and nix itself doesnt provide this natively. That means things get a little more complicated/involved when you use those ecosystems together. Its not too bad but it is annoying.

Re: Why I love NixOS

#298
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)".

A lot of us use NixOS/nix yet haven't read any documentation nor hand-written nix ourself. That's Claude Code's job.

HN: AI coding is still coding because you need the domain knowledge to steer AI in the right direction, read the code, understand it and fix it when necessary.

Also HN: No idea how this OS works, screw writing proper documentation, just ask Claude to do it! Wee!

You AI babies seriously need to pick a lane.

Re: Why I love NixOS

#299

Earlier quoted context omitted.

> [ 8080, 9000 ] Fails to parse is what it does... Are we really living in times where people can't write a single (syntactically) well-formed line of code in a programming language they use? I understand this doesn't really matter when just using NixOS Slop Edition™ but man I hate it.

You hate that I couldn't remember whether nix has array delimiters on the spot? Jeez, tough crowd. Though it also kinda represents this pride over triviality that some people latch on to in the AI world which is odd since it's also only a mistake a human would make. Had I run my hand-written comment through a proofreading clanker, I would have spared you the negative emotional reaction. In the pre-AI world, you would…

The other poster is being a jerk, but your point doesn’t really refute theirs: if you can’t even be bothered to check for an array delimiter, instead passing that on to an AI, how will you ever learn?

People are being more demanding of humans because humans are taking knowledge and learning for granted. All this abstraction has a cost, and the cost is you.

Re: Why I love NixOS

#300

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

[flagged]

Yes, for me it was 2 or 3 rounds of "its just not clicking" before it did and then there was no looking back. Ive heard the same anecdote from lots of others as well.
Post reply on HN