Skip to content
unbeholdendevPublic

About

One Nix flake for NixOS and niri on two ThinkPads, plus Home Manager config for a headless host and dev containers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dotfiles

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.

Before you run any of this

  • 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.nix erases the target disk.
  • The config expects my username, my home paths and my Forgejo server. Change them first.

Files you won't find here

  • ~/.ssh/config.local holds my SSH hosts.
  • ~/.dictate-terms adds words to the dictate transcription prompt.

Installing oren

oren is the headless VM. Install it from the NixOS installer ISO, as root:

  1. Check the target disk. disko erases /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0, the VM's scsi0; confirm it with lsblk and ls -l /dev/disk/by-id/.

  2. 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/dotfiles on 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
  3. Log in as root over SSH and switch to agent with su - agent. Run the following as agent. The prompts hide the tokens, and the files are created with mode 0600. 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. Run dots, then systemctl restart home-manager-agent so the activation logs tea and gh in and reruns the agent setup.

  4. Pair a T3 Code client with su - agent -c t3pair.

About

One Nix flake for NixOS and niri on two ThinkPads, plus Home Manager config for a headless host and dev containers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages