3 ms·
I switched my workstation over to NixOS ~6 weeks ago and it's been really good, I'm a total convert. The thing that really got me over the hump was entirely co
by linsomniac 4mo ago
I switched my workstation over to NixOS ~6 weeks ago and it's been really good, I'm a total convert. The thing that really got me over the hump was entirely configuring it using Claude Code.
One unexpected benefit is that both my workstation and my backup laptop have the same setup, so I can run updates on the scratch box before doing my workstation. I decided to run the "latest" rather than 25.11 release, so it's nice to test before I apply (I hit a GDM issue a few weeks ago that left me at a black screen; but not a huge deal, just select the "previous" option in the grub screen).
I've got everything to parity with what I had on my previous Ubuntu workstation. I had anticipated issues with some software that isn't packaged (but NixOS packages a LOT), but that wasn't an issue. Claude was able to do all those things no problem.
The biggest tricky bit was with my vim setup; I've been using AstroVIM and trying to get away from managing my own vim setup. You can't, AFAICT, just apply astrovim in NixOS. So I described the vim setup I wanted to Claude Code, and I now have a ~700 line config that implements everything I wanted: LSP, TreeSitter, a small variety of other things. Unlike Astro/Lunar, where tweaks you want to make are buried in some set of files in this whole giant distro, it is all encoded in this one "neovim.nix" file.
I also set up home-manager and SOPS and so far that has been working just great! I now have home directory settings that are replicated across 2 machines.
I'm still really only using it on one machine, so we'll see how it gets more complicated if I start running it on some servers.
- shevy-java 4mo ago> entirely configuring it using Claude Code This scares me. I would not want AI to run my computer systems.
- mplanchard 4mo agoI'm no AI booster by any stretch of the imagination, but it's not "run[ning] ... computer systems" in this case. Your NixOS setup is defined by declarative config files, and nix builds or updates a working system from them. AI in this case is just writing the config files, which you'd then (hopefully) read and at least vaguely understand before applying them.
- Yiin 4mo agothat's quite interesting because I would love for AI to run my systems, given it is capable enough (and it is given right tools). Jarvis anyone?
- spacington 4mo agoYep! Just waiting for the dgx spark style system with proper bandwidth as nd a price point of max 1500 or winning the lottery. But in 3 years I bet I will have Jarvis. Told my wife already thatwe need a lab room
- pmarreck 4mo agoIt generates a config file. You can read it before applying it. While Nix may be nigh intractable to write for some people, it is quite a bit easier to read, and any shenanigans would immediately be noticed.
- Diti 4mo agoLet’s be honest, most people do not review the full output of Claude Code because of slop fatigue.
- joseda-hg 3mo agoOn NixOS in particular, unless it's something so esoteric that I know it's worth documenting (or so obscure that it's pointless to remember), things tend to be pretty self-descriptive and most changes are relatively small. I mostly just check the diff, and if nothing looks particularly wrong, I commit it. I mostly care about the final result. Commits are there for eventual auditing, but they're not that important to me. I (or an LLM) can always clean things up later, and there's plenty of time considering this is the configuration for however many machines I'll be using for the foreseeable future. I used to spend a lot more time tinkering with configs that could be wiped out by a failed Windows Update.
- exe34 4mo agoIt writes into a configuration file that I git diff before applying.
- linsomniac 4mo agoI'm a 35-year professional sys admin, so you'd think I'd have really strong opinions about how exactly it sets the system up. Or maybe I have enough experience that I can just eyeball what it's doing and feel comfortable? I'm not sure. Kind of reminds me of the movie Ronin where the young guy is asking the seasoned CIA guy what gun he likes. "It doesn't matter, it's just a tool, I put it in my toolbox."
- mplanchard 4mo agoI'm on year 6 and still feel the same way, using NixOS for all my machines, and also for my homelab servers (building on the main machine and then deploying over SSH). Everything else feels primitive by comparison. Rolling back is incredible. I have one github repo with a top-level flake containing system definitions for all of my machines. Much of my config is modularized, so it's easy to take custom stuff from one machine and use it on another. It's nice to hear that AI tooling is making it more accessible for people.
- zihotki 4mo agoI'm building a homelab as well and fully second the ode. It feels incredible to do the setup via llm, like they are the perfect fit.
- willx86 4mo agoI eventually gave up using mason and lsp servers and used nixvim https://github.com/will-x86/nixos-dotfiles https://github.com/will-x86/nixos-dotfiles ( ./home/base/nixvim)
- linsomniac 4mo agoThat is really interesting, thanks for the pointer. I came across it a while ago when I was researching how to manually set up AstroVIM on NixOS and doing manually was a bit of a stretch for me at the time. My setup right now is a fairly straightforward nix file listing the plugins and associated packages I want, and then an embedded long-ass lua config file, and I think the nixvim would just make that part of it declarative. I think I'll make a branch on my nixos repo and just have Claude try it. No reason not to.
- willx86 4mo agoI converted with claude Use my repo for lsp.nix as neovims new v10 has a new way of configuring lsp's as lspconfig is depreciated, so I used the new lsp configuration method but went doc hunting to find out I need lspconfig for proper completions! ( I'll give it a push now to ensure it's my latest version)
- pmarreck 4mo ago> The thing that really got me over the hump was entirely configuring it using Claude Code. I MOSTLY understood it before Claude Code, but WITH Claude Code it's almost a no-brainer for most people. All the upside with none of the downside.
- linsomniac 4mo agoAgreed, that's where I was as well. I had been dabbling in manual NixOS configs for ~2 years. I mostly felt like I understood it. But as you say, all upside.
- rhco 4mo agoYou could take this one step further using Syncthing to sync important data between the workstation and laptop. That's how my devices are configured, and it's amazing - if I need to travel for work, I just pick up my laptop and go. NixOS makes sure the system itself is identical (apps, most of the code configs, etc), then any app-spcific config is handled by Syncthing. It was really magical the first few times I used my laptop on the road! Also, if you aren't already across it, you should look into remote builds/deployments. Basically, the regular nixos-rebuild command supports deploying over SSH. It's nice because you can do the heavy work (nix evaluation, building non-cached packages, etc) on your grunty workstation, then have them pushed across to the laptop via SSH. Then, when you want to apply that build to your PC, it'll be super fast (since everything is already evaluated & built!).
- linsomniac 4mo agoReally solid advice. Going to have to try that remote rebuild, because right now my 10yo T420 takes around an hour to rebuild gitbutler-cli (not yet packaged in NixOS), so that'd be real nice. I know syncthing has a solid reputation, but I'm a bit reluctant to try it on my home directory (it's super mission critical). Does that interact well with home-manager+SOPS? Mostly, when I'm away from my workstation, I just connect in from my personal macbook via the "wezterm tmux" feature, since most of what I do is either web or terminal. The need for a "pick up and go" copy is nice but not really necessary. Though in the event my main workstation fails, I should check to see how long an rsync from the restic backup would take. If it takes the better part of a day, that might be compelling to use syncthing, especially as my workstation is a 6+yo laptop.
- linsomniac 4mo agoAnswer about syncthing: I probably would set it up on only a portion of my home directory, not the whole thing, so it wouldn't impact home-manager/SOPS. However, Claude pointed out this potential issue: the bulk of my "projects" directory (my most active directory) is git repos, and (a) those are likely to conflict on both ends (a git pull on both ends), and (b) much of that syncing git can handle (except, of course, uncommitted changes).