Use an agent to edit and package your NixOS setup
They let an agent make NixOS config tweaks, package GitHub-only software, and build a locked-down systemd container sandbox.
- What they did
- The person keeps their NixOS configuration split into modules, so when a setup change feels tedious, they hand it to an agent. They also use it to turn software that lives only on GitHub into a package. For one job, they asked the agent to create a systemd container sandbox that borrowed most of the host config but could access only a couple of folders in the real home directory.
- How it went
- That sandbox took about an hour to produce and ended up as a file of around 100 lines. The changes were committed and pushed so the laptop and servers could stay aligned, and if they disliked a change they could simply drop it and rebuild.
- Tips
- Keeping the config under version control makes these experiments easy to undo. Have the agent test the build first, then wait for your approval before anything is switched on or applied.
Try it yourself with Claude Code
I use NixOS and keep my configuration in [repo path]. Please make this config change: [describe the tweak], or package this GitHub-only project: [GitHub URL]. If you need to create a sandboxed systemd container, reuse as much of the existing host configuration as makes sense, but restrict it so it can access only [allowed directories]. First do a dry run or test build, show me the diff and any errors, and then pause for my approval before applying, switching to, or submitting anything irreversible.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Build a staged agent pipeline for PRs
Create a multi-step system that assigns issues, tests changes, and leaves the final merge to a person.
Turn tickets into code changes and draft the PR
Stripe uses in-house coding agents to carry tasks from ticket to reviewable code, then humans check the result.
Have an agent grow property tests and hunt bugs
A testing agent helped engineers build fuzz tests that uncovered bugs they had not already seen.
Coordinate fix-and-review loops with a lead agent
A lead agent managed implementation and review between two subagents, only involving the human when a choice fell outside its authority or reviews kept failing.
Review Linux kernel patches before they land
Google’s Sashiko scans Linux kernel submissions and flags bugs that human reviewers missed.
Debug a phone app from a park bench
A developer spoke corrections into their phone while a coding agent began repairing a mobile web app outdoors.