Maximum security confinement for your AI agents with microVM.nix

This demo shows that the wrapper script terrax can dynamically mount different directories for the microVM at runtime. TL;DR Use microVM.nix for extreme isolation for running AI agents. For the impatient: Get the repo git clone https://github.com/kohane27/agents-in-microvm-nix cd agents-in-microvm-nix Prepare the ssh key mkdir -p ~/.ssh/microvm ssh-keygen -t ed25519 -f ~/.ssh/microvm/ssh_host_ed25519_key -N "" -C "microvm-host-key" Prepare the user key ssh-keygen -t ed25519 -f ~/.ssh/microvm-user -N "" -C "microvm-user" Replace username with your_username cd agents-in-microvm-nix find . -type f -name "*.nix" -not -path "./terrax/home-manager.nix" -not -path "./terrax/user.nix" -exec sed -i 's/username/your_username/g' {} + Add the public key to user.nix PUB_KEY=$(cat $HOME/.ssh/microvm-user.pub) sed -i "s|.*ssh-ed25519.*| \"$PUB_KEY\"|" ./terrax/user.nix Add the following inputs to your host flake.nix: { microvm = { url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; sops = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; # more up-to-date LLM packages llm-agents = { url = "github:numtide/llm-agents.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; } Copy agents-in-microvm-nix content to your NixOS dotfiles ...

February 18, 2026 · 9 min

Surviving rm -rf: Sandboxing AI agents with jail.nix

TL;DR Use jail.nix to sandbox your AI agent environment to protect your host machine from rogue agent exfiltrating your API keys or stealing browser cookies. If you also enable Claude’s --dangerously-skip-permissions or Gemini’s --yolo, there is more reason to properly restrict what the agents can do. Besides, proper sandboxing gives you ease of mind knowing that it can’t wreak havoc on your host machine. Getting Started For the impatient: ...

February 15, 2026 · 4 min

How to Run Android Mobile/TV Emulator on NixOS Using flake without Android Studio

See? I’m really running NixOS. TL;DR Use the below provided flake.nix and set ~/.android/avd/phone.avd/config.ini hw.keyboard = yes to have a good Android emulator experience. Introduction It was an absolute nightmare but I finally managed to run both Android Mobile and Android TV emulators on NixOS without resorting to using a virtual machine. This blog post was super helpful in my quest. I literally just copied the flake.nix and the Android mobile emulator worked flawlessly. ...

May 18, 2025 · 5 min

Distrobox is the greatest escape hatch for NixOS

TL;DR Use Distrobox when nixpkgs fails you or you don’t bother with declarative configuration. Introduction Never have I expected this much friction and frustration when switching to NixOS as my daily driver for development work. 1. Only nodejs 18 and above are available on nixpkgs I don’t get to choose what nodejs versions to use for work. For legacy projects I need nodejs 8, 14, 16 etc. The “oldest” compiled nodejs version available in nixpkgs is 18. I found Nix package versions but it requires compiling them from source. I can’t tell my boss “I’m compiling Nodejs 10 please wait 4 hours” before working on it. How I miss fnm. ...

March 31, 2025 · 3 min

How to Use nixCats-nvim in NixOS

flowchart TD A[Start] --> B{Is plugin in nixpkgs?} B -->|Yes| C[Add to optionalPlugins] B -->|No| D[Add to flake inputs] C --> E[Add any plugin dependencies and tools] D --> E E --> G[Register to lze in init.lua] G --> K[Run nix build .] K --> L[Test with ./result/bin/nvim] TL;DR Check it out: nixCats-nvim-example Run git clone https://github.com/kohane27/nixCats-nvim-example.git ~/.config/nixCats-nvim and start tinkering! Caveat My template assumes you are familiar with the Neovim plugin ecosystem, like adding plugins with lazy.nvim in a normal Linux/MacOS environment. This guide only shows you how to do so in Nix/NixOS. ...

March 29, 2025 · 5 min

Which one should I use: programs.neovim, nixCats-nvim, nixvim or nvf?

flowchart TD A[How do you use Neovim?] --> B[Basic text editing] A --> C[IDE/PDE experience] B --> D[Use programs.neovim] C --> E[Configuration preference?] E --> F["Nix manages plugins Lua configures nvim"] E --> G[Fully in Nix] F --> H[Use nixCats-nvim] G --> I["Use nvf"] H --> J[Starting point?] J --> K[Already using lazy.nvim] J --> L[Want maximum control] K --> M["templates/LazyVim"] L --> N["templates/example"] click C "https://www.youtube.com/watch?v=QMVIJhC9Veg" _blank click D "https://nixos.wiki/wiki/Neovim" _blank click H "https://github.com/BirdeeHub/nixCats-nvim" _blank click K "https://github.com/folke/lazy.nvim" _blank click I "https://github.com/NotAShelf/nvf" _blank click M "https://github.com/BirdeeHub/nixCats-nvim/tree/main/templates/LazyVim" _blank click N "https://github.com/BirdeeHub/nixCats-nvim/tree/main/templates/example" _blank programs.neovim If the following describes how you use neovim: ...

March 29, 2025 · 4 min

Step-by-Step Guide: Installing NixOS on VirtualBox for librephoenix's NixOS Config

TL;DR Download the Minimal ISO image and follow the Manual Installation to install librephoenix-nixos-config. I can’t stress this enough: DO NOT use any graphical ISO images like GNOME or Plasma Desktop! Use the Minimal ISO image not because we’re trying to be cool but because we want to make it work. Introduction If you think it’s as straightforward as installing Ubuntu, you’re in for a big surprise. There are so many gotchas along the way that I have to write it down for my future self, and hopefully for some other poor souls that stumble upon this article. ...

March 10, 2024 · 6 min