Live data from Hacker News

Why I love NixOS

birkey.co

321–323 of 323 posts

Re: Why I love NixOS

#321

After having done the switch to nixOS, I can confidently say that managing a system any other way (like with apt/brew + 20 handwritten bash scripts) really is neanderthal technology and nix is superior in every single way. It's also great for the AI era, copilot is really good with that stuff.

> like with apt/brew + 20 handwritten bash scripts I just use apt, been doing it for 20 years, it works great. I've never in my time, heard of or knew anyone who wrote 20 (or any) bash script wrappers around apt. The one year I was painfully forced to use a Mac for work, brew worked similarly to apt, just used it, no need to wrap it with shell scripts. Comparing highly functional and capable systems like apt and brew…

I've been using apt for 20 years too and was never a fan of it, canonical repos are never up-to-date and managing ppas is a pain. Yes I'm very hype about nixOS (and that's a rare thing for me), but it is just really really good.

I understand that "just check it out" is not the best advice because the setup cost to using nixOS is really high, and the learning curve is really steep, so it's not like you can give it a whirl for a few hours to experience the workflow. But believe me, once you are used to it, it just so so much more convenient. I'm currently managing my dev laptop, home PC, a WSL, and a hetzner server all in the same repository (allowing for a lot of code reuse). Everything is super orderly and split into modules, everything is declarative, I can roll back to a previous build of my system if I mess up installing nvidia drivers or iwd or bluetooth etc.

It's also not like installing software is harder than with apt (oftentimes it is easer, `programs.firefox.enable = true`) so after you've paid the setup cost there is just no downside. It's a bit like react vs jQuery, or Kubernetes vs hand-written deployment scripts.

Re: Why I love NixOS

#322
post #314

Earlier quoted context omitted.

I just have a hard time taking such a comment seriously, because I have made it myself. Many times even. My second comment on Slashdot in 1999 was a comment just like yours. I try to tell myself it is ok because I was still a teenager. 7 years later I had to write common lisp and I think the parens were a problem for about a week. Since then I have written many thousand lines of lisp code. I usually go back and forth…

I think you’re misunderstanding my point. This isn’t about whether someone can get used to parentheses. Obviously they can. I don’t doubt your extensive experience there. The question is what the language optimizes for by default. My argument is that S-expressions optimize for structural uniformity and macro power, but they do so at the expense of plain-text readability without tooling. And that trade-off matters in…

All syntaxes look like windy grass to someone who is not used to them. I think that, while the parsing overhead for lisps might be higher, there is nothing else going on with precedence or syntax. Reading ocaml or haskel operator soup is in my opinion way more taxing than reading verbose scheme code - if it is well formatted.

Re: Why I love NixOS

#323
post #16

The idea is so good it’s as close to platonic as it gets. The user experience of writing your own nix expressions is so bad that it makes me angry every time I try. Not only that, but at some point the beginner help (!) meta became »use flakes, don’t do what the existing tutorials tell you, yes flakes are unstable beta and there are no tutorials but use it I beg you«. No, please, let me choose my own way to learn! I…

>I haven’t given it a shot in the LLM age I haven't tried it in almost a year, but using Claude Code for setting up my nix config back then worked amazingly well. I've only dabbled in NixOS, and I'm very tempted to it for my workstation when I reinstall it in the next month. Given how much Claude Code + Opus have improved in the last year, I'd give it a fighting chance to make a nice Nix config. I'll probably start s…

To close the loop, I set up a new nixos machine, and have been using Claude Code today to work on configuring it. I was able to point it at some attempts I made in the past, ask it to modernize the setup using flakes, ask it to install a bunch of software and make a bunch of setup changes, shell setup and aliases, switch over to using sway, etc.

I've been bouncing around different vim setups for a while (lunar, astro), but they all seem needlessly complex. I do have a working astro setup, but I had a lot of problem in the past trying to apply it on Nix. Plus, I'm a fairly minimal vimer in general, so I've always felt like I might be better off doing a simpler setup.

I asked claude code to set up a minimal but modern vim config, but with: treesitter and LSPs (for python, ansible, bash, json, yml), and then adding a few other little quality of life features that I've come to rely on. It did a pretty good job, from the basic testing I've done with it so far.

It feels much more manageable than something like Astro or Lunar vims. Every time I have to upgrade those, it's a bunch of files with variables I can configure to control, but those settings aren't super well documented. The nix setup I've got is almost 700 lines in a "neovim.nix", but everything about it is configured directly in there, which seems a lot more discoverable. Fewer levels of indirection.

Post reply on HN