Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ RUN mkdir -p /home/vscode/.ssh && chmod 700 /home/vscode/.ssh

# Create .config/gh directory for GitHub CLI config mounts
RUN mkdir -p /home/vscode/.config/gh

# Pre-install pixi global packages for dotfiles (devpod profile)
# Makes dotfiles install.sh near-instant since packages are already present
COPY --chown=vscode .devcontainer/pixi-global-devpod.toml /home/vscode/.pixi/manifests/pixi-global.toml
RUN pixi global sync

# Pre-warm project pixi environment for faster cold starts
COPY --chown=vscode pyproject.toml pixi.lock /tmp/pixi-prewarm/
RUN mkdir -p /tmp/pixi-prewarm/python_template \
&& touch /tmp/pixi-prewarm/python_template/__init__.py \
&& cd /tmp/pixi-prewarm \
&& pixi install \
&& mv .pixi /home/vscode/.pixi-prewarm
Comment on lines +31 to +35
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Consider cleaning up the temporary /tmp/pixi-prewarm directory to avoid bloating the image

Since /tmp/pixi-prewarm and the python_template placeholder are only needed during build to bootstrap pixi, everything there becomes unused once .pixi is moved to /home/vscode/.pixi-prewarm. Consider appending && rm -rf /tmp/pixi-prewarm to this RUN command to avoid shipping that dead weight in the final image layer.

12 changes: 6 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
// },
"image": "ghcr.io/blooop/python_template/devcontainer:latest",

"features": {
"./claude-code": {},
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
// "ghcr.io/devcontainers/features/common-utils:2": {}
},
// Features baked into prebuilt image by CI; uncommented for local builds
// "features": {
// "./claude-code": {}
// },

"initializeCommand": ".devcontainer/claude-code/init-host.sh",
"customizations": {
Expand Down Expand Up @@ -47,5 +46,6 @@
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind",
"source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind"
],
"postCreateCommand": "sudo chown vscode .pixi && pixi install"
"onCreateCommand": "[ -f .pixi/.gitignore ] || cp -a /home/vscode/.pixi-prewarm/. .pixi/ || true",
"postCreateCommand": "git config merge.ours.driver true && pixi install"
}
65 changes: 65 additions & 0 deletions .devcontainer/pixi-global-devpod.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Pixi global manifest for devpod profile (rendered from chezmoi template).
# Keep in sync with ~/.local/share/chezmoi/dot_pixi/manifests/pixi-global.toml.tmpl
version = 1

# === CORE TOOLS ===

[envs.fzf]
channels = ["conda-forge"]
dependencies = { fzf = "*" }
exposed = { fzf = "fzf" }

[envs.zoxide]
channels = ["conda-forge"]
dependencies = { zoxide = "*" }
exposed = { zoxide = "zoxide" }

[envs.forgit]
channels = ["https://prefix.dev/blooop", "conda-forge"]
dependencies = { forgit = "*" }
exposed = { git-forgit = "git-forgit" }

[envs.fd-find]
channels = ["conda-forge"]
dependencies = { fd-find = "*" }
exposed = { fd = "fd" }

[envs.ripgrep]
channels = ["conda-forge"]
dependencies = { ripgrep = "*" }
exposed = { rg = "rg" }

[envs.chezmoi]
channels = ["conda-forge"]
dependencies = { chezmoi = "*" }
exposed = { chezmoi = "chezmoi" }

[envs.gh]
channels = ["conda-forge"]
dependencies = { gh = "*" }
exposed = { gh = "gh" }

[envs.prek]
channels = ["conda-forge"]
dependencies = { prek = "*" }
exposed = { prek = "prek" }

[envs.jq]
channels = ["conda-forge"]
dependencies = { jq = "*" }
exposed = { jq = "jq" }

[envs.claude-shim]
channels = ["https://prefix.dev/blooop", "conda-forge"]
dependencies = { claude-shim = ">=0.3.0" }
exposed = { claude = "claude", cld = "cld", cldr = "cldr" }

[envs.lazygit]
channels = ["conda-forge"]
dependencies = { lazygit = "*" }
exposed = { lazygit = "lazygit" }

[envs.vim]
channels = ["conda-forge"]
dependencies = { vim = "*" }
exposed = { ex = "ex", rview = "rview", rvim = "rvim", view = "view", vim = "vim", vimdiff = "vimdiff", vimtutor = "vimtutor", xxd = "xxd" }
4 changes: 4 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
- "pyproject.toml"
- "pixi.lock"
pull_request:
branches: ["main"]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
- "pyproject.toml"
- "pixi.lock"
workflow_dispatch:

permissions:
Expand Down