From 7eacd3c160f23fbff65c510aae70266b33b48bc2 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 19 Jun 2026 16:36:01 +0100 Subject: Use local gpg-agent on VM --- nix/README.md | 55 +++++++++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 36 deletions(-) (limited to 'nix/README.md') diff --git a/nix/README.md b/nix/README.md index 2bf3383..4a27ae1 100644 --- a/nix/README.md +++ b/nix/README.md @@ -87,49 +87,31 @@ If a project needs a newer build toolchain, drop a `flake.nix` + `.envrc` in that project tree (direnv + nix-direnv is already wired up). Don't add it to `common.nix`/`host.nix`/`vm.nix`. -## Commit signing on the VM (SSH-format, no GPG secrets) +## Commit signing and SSH auth on the VM (GPG) -GPG private keys never leave the host. Commits on the VM are signed -with the **forwarded SSH agent** in SSH-signature format, using the -authentication subkey gpg-agent already exposes via `ssh-add -L`. +The VM uses its own local `gpg-agent`, like the host. Import the work +GPG private key manually on the VM; do not use SSH agent forwarding for +commit signing or SSH auth. One-time setup on the VM: ```sh -mkdir -p ~/.config/git - -# allowed_signers: maps your committer email to the SSH pubkey of the -# auth subkey. Adjust the grep if you have multiple keys. -printf '%s %s\n' \ - "$(git config user.email)" \ - "$(ssh-add -L | head -n1)" \ - > ~/.config/git/allowed_signers - -# Machine-local git override (NOT tracked in dotfiles). -cat > ~/.config/git/config.local <