From d6f7eb46cdec6f2584ac5d202e6dea66a88c3dc8 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Wed, 16 Sep 2026 17:57:16 +0700 Subject: [PATCH] feat(paseo): preinstall nano and set the git identity from the environment GIT_NAME and GIT_EMAIL expand into the four GIT_AUTHOR_*/GIT_COMMITTER_* variables, the same shape code-server already uses. Passing the identity as environment rather than running `git config` means agents and terminals commit correctly with no setup step, and it does not depend on ~/.gitconfig surviving in the /home/paseo volume. --- paseo/.env.example | 6 ++++++ paseo/Dockerfile | 2 +- paseo/README.md | 3 ++- paseo/compose.yml | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/paseo/.env.example b/paseo/.env.example index bdfaa43..bb1109b 100644 --- a/paseo/.env.example +++ b/paseo/.env.example @@ -25,6 +25,12 @@ PASEO_LABEL=paseo # Timezone for logs and agent shells. TZ=Asia/Ho_Chi_Minh +# Git identity for agents and terminals, as author and committer. These reach +# git as environment variables, so they need no `git config` and survive a +# rebuild -- unlike a ~/.gitconfig, which only lives in the /home/paseo volume. +GIT_NAME=tiennm99 +GIT_EMAIL=tiennm99@outlook.com + # Shell for Paseo's terminals. Paseo reads $SHELL and falls back to /bin/sh # (dash), ignoring the user's login shell, so set it here rather than running # chsh -- which would be reverted by the next rebuild anyway. diff --git a/paseo/Dockerfile b/paseo/Dockerfile index dc9b6ce..3727858 100644 --- a/paseo/Dockerfile +++ b/paseo/Dockerfile @@ -11,7 +11,7 @@ FROM ghcr.io/getpaseo/paseo:latest # not, despite Debian's base-passwd shipping an (empty) sudo group. RUN apt-get update \ && apt-get install -y --no-install-recommends \ - less jq unzip zip lsof psmisc ugrep bfs zsh sudo \ + less nano jq unzip zip lsof psmisc ugrep bfs zsh sudo \ && rm -rf /var/lib/apt/lists/* \ && usermod -aG sudo paseo diff --git a/paseo/README.md b/paseo/README.md index af3321c..dacf6f2 100644 --- a/paseo/README.md +++ b/paseo/README.md @@ -35,6 +35,7 @@ the old entry is cached in `localStorage`. | `PASEO_HOSTNAMES` | Domains allowed to reach the daemon, comma-separated. Your domain must be listed. | | `PASEO_TRUSTED_PROXIES` | Set to `uniquelocal`, or the UI loads but never connects. | | `PASEO_LABEL` | Container hostname. Paseo shows it as the host label in the UI; without it you get a random container ID. | +| `GIT_NAME` / `GIT_EMAIL` | Git author and committer identity for agents and terminals. | | `TZ` | Timezone for logs and agent shells. | | `SHELL` | Shell for Paseo's terminals. Paseo reads `$SHELL` and falls back to `/bin/sh`, ignoring the login shell, so `chsh` has no effect. | @@ -71,7 +72,7 @@ but anything written outside `$HOME` (`chsh`, `apt install`) is lost on rebuild. | `gh` | GitHub's signed apt repo | Debian does not package it | | Go (`GO_VERSION`) | Official go.dev tarball | Debian 12 ships 1.19 | | Python (`PYTHON_VERSION`) | `uv python install` | Debian 12 ships 3.11 | -| `less jq unzip zip lsof psmisc ugrep bfs zsh sudo` | apt | — | +| `less nano jq unzip zip lsof psmisc ugrep bfs zsh sudo` | apt | — | Bump a language with a build arg, e.g. `--build-arg GO_VERSION=1.27.1`. Add other agent providers to the `npm install` line: diff --git a/paseo/compose.yml b/paseo/compose.yml index a4f0d13..5a4d10f 100644 --- a/paseo/compose.yml +++ b/paseo/compose.yml @@ -8,6 +8,10 @@ services: - PASEO_PASSWORD=${PASEO_PASSWORD} - PASEO_HOSTNAMES=${PASEO_HOSTNAMES} - PASEO_TRUSTED_PROXIES=${PASEO_TRUSTED_PROXIES} + - GIT_AUTHOR_NAME=${GIT_NAME} + - GIT_AUTHOR_EMAIL=${GIT_EMAIL} + - GIT_COMMITTER_NAME=${GIT_NAME} + - GIT_COMMITTER_EMAIL=${GIT_EMAIL} volumes: - 'paseo-home:/home/paseo' - 'paseo-workspace:/workspace'