3 ms·
A lot of us use NixOS/nix yet haven't read any documentation nor hand-written nix ourself. That's Claude Code's job.
by hombre_fatal 7mo 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.
- drdaeman 7mo agoIf only. Claude Code has to be actively steered, because while it knows some nixpkgs it surely doesn’t know it enough. E.g. it was absolutely incapable of fixing lldap settings after system upgrade from 25.05 to 25.11. It just prodded around blindly, producing meaningless configs instead learning how the module works. NixOS docs work for me, but I tend to just go for the nixpkgs source instead. Manuals document options but not how those are actually plumbed through, nor what remains behind the scenes like all systemd unit settings). Claude can do this too, but it goes quite weird roundabout ways with a lot of weird `find /nix/store` and `nix eval`s to get to it, slow and token-hungry (and not always accurate). This said, Claude is very helpful at checking logs and providing a picture of what’s going on - saves ton of time this way. Plus it can speed up iterating on changes after it’s fed enough knowledge (but don’t expect it to do things right, that’s still on you). It has breadth of it, but not the depth, and that shows at almost any non-trivial task.
- hombre_fatal 7mo agoYou don't have Claude Code git clone nixpkgs and home-manager for local reference? I feel you on the nix store + nix eval death loop, though it gleans real info. If I weren't on the Claude Max plan I'd probably feel more of the pain. And context is now 1MM tokens which means you're not running out just as it's starting to piece things together, heh.
- drdaeman 7mo agoI do, but it somehow tends to forget how to do things right now and then - despite having notes in memories system - and starts to do them in its own weird ways. I’m going to experiment with skills next, or maybe make it build a few helper scripts for itself to quickly get some module source from nixpkgs matching flake.lock without having to think of it all. I’m positive about Claude for nix management, merely saying it’s not something that “just works” for now and reading nix code is still on the human part of the tandem. This said, to be fair - when it gets the approach right, it excels. I was setting up Ente for photos backup and sharing, and it produced a nice overlay with custom patches for my needs from just “figure out why /shared-albums/ redirects wrong and fix”. Found the module, the package, pulled source, analyzed it, proposed a patch (settings weren’t enough), did it - I only had to test, and only because I haven’t provided it with a browser. Felt amazing.
- johnisgood 7mo agoI 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.
- hombre_fatal 7mo agoNixOS 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 in time through daily exposure like anything else.
- shevy-java 7mo ago> Unless you're brand new to Linux or computing, it's not a mystery what a given nix config change is ever doing. I am not brand new - and I don't know what the heck the config is doing. That is why I rely on documentation. The "code is self-explanatory" is always an attempt to not have useful documentation and try to rationalise that problem away.
- hombre_fatal 7mo agoNothing about this changes with Nix nor AI agents. You can read documentation on an as-needed basis or to your heart's content. The point is that the majority of the day to day changes I make to my desktop environment aren't so critical that I need to do more than read an AI agent's proposed changes to my config and accept them when they look reasonable. And I don't think looking up the exact config options to NixOS' networking system does anything to increase my knowledge of the OS. It's just a triviality.
- sally_glance 7mo agoComing 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.
- beepbooptheory 7mo agoKind 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 can keep configuration "in your head" such that you can reason and iterate and fully know what your system is like at any moment. If you actually don't care about that, you aren't getting anything out of it!
- hombre_fatal 7mo agoThe 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 between me and a non-nix user, not whether we can rattle off the exact state of our live system from memory. The non-nix user has to query live system state, if such query tools even exist for their question, and I get to read a config file. And I get to maintain my system config in git, and I get to deploy my config on all of my machines.
- beepbooptheory 7mo agoBut 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.
- dml2135 7mo agoFor me, the difference is that there is no way in hell that I want to give an AI assistant full access to configure my system live. With a declarative config, the only access it needs is to an isolated git repo.
- eikenberry 7mo agoSo relying on closed source code using a closed model to configure a free OS. That's a step back.
- MarsIronPI 7mo agoOn the contrary, the model doesn't actually add any lock-in. When GP wants to switch to free model the config files are still there. There's no lock-in, as I see it.
- eikenberry 7mo agoIt is not about lock-in, it is about free software being usable without resorting to non-free software. One of the free models is usable for this would be a better shift and that might be workable but I'm not sure about how well they'd work.
- ofkwidjwus 7mo agoHN: 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.