logoalt Hacker News

pkulak • today at 8:45 PM • 5 replies • view on HN

I got heavy into NixOS pre-ai, in like 2020, but I agree, it's an ABSOLUTE joy now. My entire OS is custom built to my workflow, down to every little step. I have custom scripts and services all over the place removing friction. And it's not even chaos! My whole config is logically laid out and I understand every single line, with every module and feature in it's own little spot. And as soon as I notice something about my setup I don't like: I throw an agent at it. If I want to try some software that only lives in github, an agent packages it for me. If I don't like it: abandon the change and rebuild.

I even had an agent build it's own sandbox. It's a systemd container that pulls in most of my host config, but only has access to a couple directories in my real home. There are so many "container/vm for your agent" projects on github: I built my own in an hour. The file is about 100 lines long; that's it.

Every change I make is committed and pushed. I have my OS history going back 6 years. My laptop and servers stay in sync with my setup for free. If I buy a new laptop (maybe someday), setup takes an hour, almost all unattended.


Replies

indemnity • today at 10:33 PM

I have this, but multiplied across all my machines with flakes. Three Linux servers, one Linux gaming desktop, and two Macs (running nix-darwin).

Depending on the role it may have a different set of packages, my edge firewall is obviously stripped way back.

But like you whenever there is friction, I now have my agent cook up a recipe or tool to remove it, and add it to the Flake repository.

Secrets are managed via a custom built system I have that needs going through a YubiKey to decrypt .age files on the fly.

On all machines that have similar roles I have the same tools, configured the same.

It’s so great. AI fixed the usability issue with Nix and NixOS, now it’s become a completely tailored to me computing environment.

➕ show 2 replies
nickjj • today at 9:02 PM

I have something similar except I don't use AI and I'm using Arch Linux, but it also works with WSL 2 in Windows and supports macOS for the non-GUI related packages / config.

It's nice to have a personal dev box and a travel laptop both using the same set up with tiny differences and then being able to do the same for CLI tools on a work laptop running within macOS.

It's just a single non-committed config file and a committed shell script with no git forks needed to customize it https://github.com/nickjj/dotfriedrice. A bunch of friends are using it and hundreds of others based on GitHub's stats.

Since I backup my home directory I can blow out and create a new system in however long it takes to run through the Arch installer and then invoke 1 command to set everything up. About 10-15 minutes to set up a fresh machine.

I'd consider NixOS if cross OS compatibility wasn't a concern but a shell script and Arch has been great a combo for building a custom set up from the ground up. It's something I've been doing for my dev environment for around 8 years now but only introduced a GUI in the last year once my ~12 year old hardware was compatible with native Linux so I could finally drop Windows with WSL 2.

➕ show 1 reply
markstos • today at 8:59 PM

Nix is also great outside of NixOS. I use it to keep packages consistently installed across a Ubuntu, Arch and NixOS devices.

I use a NixOS VM to contain my dev work with my agent, which itself is setup by Nix. This protects against supply chain attacks from package installs and other things that might go sideways with linters and other tooling.

pimeys • today at 9:42 PM

Yep. Same. And think about deploying all your servers with Nix/NixOS. Including vllm that needs tons of patches to work fast and correct. And all your derivations are in version control. You can prompt changes, test them locally, deploy fearlessly.

c7b • today at 8:52 PM

Do you have any comparison to guix? I'm intrigued by the concept, and I think some of guix' choices would appeal better to me, but I'm unsure about the size of the ecosyste,m, I almost never hear about it.

➕ show 4 replies