docs: agent onboarding — HOME agents.md symlink, git safe.directory, rebuild flow#26
Open
bpmct wants to merge 2 commits into
Open
docs: agent onboarding — HOME agents.md symlink, git safe.directory, rebuild flow#26bpmct wants to merge 2 commits into
bpmct wants to merge 2 commits into
Conversation
…rebuild flow Make the box easier for agents (and humans) to work on after an install: - programs.git safe.directory whitelists the root-owned /etc/nixos-repo so interactive git/nix as the login user no longer trips git's dubious-ownership guard (the box's own services already pass -c safe.directory inline; this covers ad-hoc use). Harmless on appliance ISOs where the repo is a read-only store path. - A tmpfiles L+ rule symlinks ~/agents.md -> /etc/nixos-repo/agents.md in every normal-user home, so an agent landing in $HOME finds the guide immediately (the motd only shows on interactive login, not over `ssh host 'cmd'`). - agents.md: document rebuilding via --flake /etc/nixos-repo, the /etc/nixos symlink-dir trap, and the harmless dirty-tree warning. Verified with nixos-rebuild dry-build.
Add the GitHub CLI to systemPackages so working on this repo from the box (opening PRs, checking CI) doesn't need a separate install. Ships unauthenticated; the login user runs `gh auth login` once. Note it in agents.md alongside the git workflow. Verified with nixos-rebuild dry-build (pulls gh 2.83.2).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the box easier for agents (and humans) to work on after an
install.shinstall.What & why
programs.gitsafe.directory whitelists the root-owned/etc/nixos-reposo interactivegit/nixas the login user (or viasudo) no longer trip git's dubious-ownership guard (repository path ... is not owned by current user). The box's own services already pass-c safe.directory=...inline; this only covers ad-hoc use. Harmless on appliance ISOs where the repo is a read-only Nix store path (not a git repo).~/agents.mdsymlink via a tmpfilesL+rule into every normal-user home, so an agent landing in$HOMEfinds the guide immediately. The motd only shows on interactive login — not overssh host 'cmd', which is how an automation agent connects — so a file on disk is the reliable discovery path.agents.md: document rebuilding via--flake /etc/nixos-repo, the/etc/nixossymlink-dir trap (--flake /etc/nixosfails because that dir holds only aflake.nixsymlink, so Nix can't find the sibling files), and the harmlessGit tree dirtywarning + the intent-to-add re-add command.Validation
nixos-rebuild dry-build --flake /etc/nixos-repo— evaluates clean;~/agents.mdsymlink created on switch and resolves.