NixOS and niri on two ThinkPads, and NixOS on a headless Proxmox VM. Program directories mirror paths under
$HOME; modules in home/ install them.
This is a mirror of my private repo.
- The Claude Code and Codex defaults turn off permission prompts, and Codex's sandbox too. On the disposable headless VM that runs them as an unprivileged user, that's what I want. On your own machine it probably isn't.
- Running disko with
nixos/disk.nixerases the target disk. - The config expects my username, my home paths and my Forgejo server. Change them first.
~/.ssh/config.localholds my SSH hosts.~/.dictate-termsadds words to thedictatetranscription prompt.
oren is the headless VM. Install it from the NixOS installer ISO, as root:
-
Check the target disk. disko erases
/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0, the VM'sscsi0; confirm it withlsblkandls -l /dev/disk/by-id/. -
Clone the repo and check out the commit you reviewed.
export NIX_CONFIG='experimental-features = nix-command flakes' nix-shell -p git --run 'git clone --branch main <repo-url> /tmp/dotfiles' nix-shell -p git --run 'git -C /tmp/dotfiles reset --hard <reviewed-commit>'
Run the Disko package from that checkout's
flake.lock, then copy the checkout to/srv/dotfileson the new system and install from it.nix run --no-update-lock-file /tmp/dotfiles#disko -- --mode destroy,format,mount --flake /tmp/dotfiles#oren mkdir -p /mnt/srv cp -a /tmp/dotfiles /mnt/srv/dotfiles nixos-install --flake /mnt/srv/dotfiles#oren reboot
-
Log in as root over SSH and switch to
agentwithsu - agent. Run the following asagent. The prompts hide the tokens, and the files are created with mode0600. An existing file stops the loop.( umask 077 set -C for service in forgejo github; do token=$(systemd-ask-password "Token for $service") || exit 1 [ -n "$token" ] || exit 1 printf '%s\n' "$token" > "$HOME/.$service-token" || exit 1 done )
Return to root with
exit. Rundots, thensystemctl restart home-manager-agentso the activation logsteaandghin and reruns the agent setup. -
Pair a T3 Code client with
su - agent -c t3pair.