by quchen · 8mo ago · 0 comments
I haven’t given it a shot in the LLM age yet though, and trying out NixOS in a VM is not only easy, it is practical – in the sense that when you’re happy, you can simply boot that same config/OS anywhere else by just installing that config. And I’ll never forget that one time where I completely borked my everything in the VM, did a kernel rollback with like 3 command line args and a reboot, and the OS was, well, rolled back. As I said, almost platonic.
What I can recommend is using nix-the-package-manager. Whenever I need the newest version of something, `nix-env -i <whatever>` and it’s there and works. If it doesn’t, roll back. If I need a different version, that’s on nixpkgs as well, with the same negligible amount of friction.
Using AI to generate Nix config is a superpower. Because the entire system is declared in a single set of config, you can basically spell cast any system you want. I one-shotted a Linux distro with custom branding for boot, installation screen, and login screen, and VPN and dev tools installed and configured by default, at a fortune 500 tech company.
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 setting up a spare laptop to get the base configs dialed in before switching over to it.
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.