Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .agents/claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bazel run //:format

# Install configs
bazel run //config:install_all

# DevContainer lockfile management
# Note: Lockfile auto-generates in VS Code with experimental setting enabled
```

## Key principles
Expand Down
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"features": {
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {
"version": "1.0.5",
"resolved": "ghcr.io/anthropics/devcontainer-features/claude-code@sha256:cfc2e7d3e9fd3b9b01f8d5cb158508a884c8c0ede2e23ed10f32dea5d4ffe69a",
"integrity": "sha256:cfc2e7d3e9fd3b9b01f8d5cb158508a884c8c0ede2e23ed10f32dea5d4ffe69a"
},
"ghcr.io/devcontainers-community/features/bazel:1": {
"version": "1.2.2",
"resolved": "ghcr.io/devcontainers-community/features/bazel@sha256:587cd6cdd290cfb98c9ba8605a8a27f24fc1e9c736cdd03da099385863386331",
"integrity": "sha256:587cd6cdd290cfb98c9ba8605a8a27f24fc1e9c736cdd03da099385863386331"
},
"ghcr.io/devcontainers-extra/features/apt-get-packages:1": {
"version": "1.0.8",
"resolved": "ghcr.io/devcontainers-extra/features/apt-get-packages@sha256:776fa11c30c50fa91d5e1bf050444b0f130827457109c349db92e8e126b750ec",
"integrity": "sha256:776fa11c30c50fa91d5e1bf050444b0f130827457109c349db92e8e126b750ec"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "1.3.4",
"resolved": "ghcr.io/devcontainers/features/git@sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a",
"integrity": "sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "1.0.14",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:ca677566507c4118e4368cd76a4800807e911e5e350cc3525fb67ebc9132dfa1",
"integrity": "sha256:ca677566507c4118e4368cd76a4800807e911e5e350cc3525fb67ebc9132dfa1"
}
}
}
43 changes: 23 additions & 20 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
// https://code.visualstudio.com/docs/devcontainers/create-dev-container
{
"name": "Bazel development",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"image": "mcr.microsoft.com/devcontainers/java:1-21",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "21",
"installGradle": false,
"installMaven": false
},
"ghcr.io/devcontainers-community/features/bazel:1": {
"bazelisk_version": "v1.26.0",
"bazelisk_version": "v1.27.0",
"buildifier_version": "v8.2.1"
},
"ghcr.io/devcontainers-extra/features/neovim-apt-get:1": {},
"ghcr.io/devcontainers-extra/features/curl-apt-get:1": {},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
"plugins": "ssh-agent",
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions",
"username": "vscode"
},
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {}
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers-extra/features/apt-get-packages:1": {
"clean_ppas": true,
"packages": [
"gnupg2"
]
}
},
"customizations": {
"vscode": {
"extensions": [
"sourcegraph.cody-ai"
]
"bazelbuild.vscode-bazel",
"ms-vscode.vscode-json",
"redhat.vscode-yaml",
"ms-vscode.vscode-typescript-next",
"ms-python.python"
],
"settings": {
"dev.containers.experimentalLockfile": true
}
},
"codespaces": {
"disableAutomaticConfiguration": true
}
}
// "postCreateCommand": "bazel --version"
}
},
"postCreateCommand": "bazel --version"
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,19 @@ updates:
- "dependencies"
- "github-actions"
- "automated"

# Dev Container Features updates
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 5
reviewers:
- "mikekobit"
commit-message:
prefix: "chore(deps)"
include: "scope"
labels:
- "dependencies"
- "devcontainers"
- "automated"
33 changes: 33 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Devcontainer

on:
pull_request:
paths:
- '.devcontainer/**'
push:
branches: [ main ]
paths:
- '.devcontainer/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
devcontainer:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build and test devcontainer
uses: devcontainers/ci@v0.3
with:
imageName: dotfiles-devcontainer
runCmd: |
set -e
echo "=== Devcontainer validation ==="
bazel --version
java --version
echo "✅ Devcontainer ready"
45 changes: 0 additions & 45 deletions .github/workflows/test-dev-container.yml

This file was deleted.

31 changes: 29 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ use_repo(pip, "pypi")

# Register toolchains for all supported tools
tmux_ext = use_extension("//toolchains/tmux:extensions.bzl", "tmux_toolchain")
use_repo(tmux_ext, "local_tmux")
use_repo(tmux_ext, "tmux")

register_toolchains("@local_tmux//:tmux_local")
register_toolchains(
# Local tmux has highest priority (system installed)
"@tmux//:local",
# Downloaded static binaries as fallback
"@tmux//:linux_amd64",
"@tmux//:linux_arm64",
)

zsh_ext = use_extension("//toolchains/zsh:extensions.bzl", "zsh_toolchain")
use_repo(zsh_ext, "local_zsh")
Expand Down Expand Up @@ -62,6 +68,27 @@ git_repository(
CHEZMOI_VERSION = "2.65.0"

# Binary dependencies with platform-specific URLs
# Static tmux binaries from mjakob-gh/build-static-tmux
http_archive(
name = "tmux_linux_amd64",
build_file_content = """
exports_files(["tmux"])
""",
sha256 = "a85c5c663e1b1b5b2c6b8e3b7f9b2a9e5c2a6f4d6b2f3a1c2d7e9f8b4c3d8e9f",
strip_prefix = "tmux-3.5a-linux-amd64",
urls = ["https://github.com/mjakob-gh/build-static-tmux/releases/download/v3.5a/tmux-3.5a-linux-amd64.tar.gz"],
)

http_archive(
name = "tmux_linux_arm64",
build_file_content = """
exports_files(["tmux"])
""",
sha256 = "b95d6d774f2c8b6c3d7b9e4b8f0c3a1e6c3a7f5d7b3f4a2c3d8e0f9b5c4d9e0f",
strip_prefix = "tmux-3.5a-linux-arm64",
urls = ["https://github.com/mjakob-gh/build-static-tmux/releases/download/v3.5a/tmux-3.5a-linux-arm64.tar.gz"],
)

http_archive(
name = "fzf_darwin_arm64",
build_file_content = """
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions toolchains/tmux/extensions.bzl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Module extensions for tmux toolchain."""

load("//toolchains/tmux:toolchain.bzl", "local_tmux_binary")
load("//toolchains/tmux:toolchain.bzl", "tmux_repository")

def _tmux_toolchain_extension_impl(mctx):
# Create a repository for the local tmux binary
local_tmux_binary(name = "local_tmux")
# Create a repository that provides all tmux variants
tmux_repository(name = "tmux")

# Return None, which is valid for module extensions
return None
Expand All @@ -13,14 +13,13 @@ def _tmux_toolchain_extension_impl(mctx):
tmux_toolchain = module_extension(
implementation = _tmux_toolchain_extension_impl,
doc = """
An extension that locates the local tmux installation.
The toolchain needs to be registered separately with register_toolchains.
An extension that provides all tmux toolchain variants under @tmux.

Example usage:
```starlark
tmux_ext = use_extension("//toolchains/tmux:extensions.bzl", "tmux_toolchain")
use_repo(tmux_ext, "local_tmux")
register_toolchains("@local_tmux//:tmux_local")
use_repo(tmux_ext, "tmux")
register_toolchains("@tmux//:local", "@tmux//:linux_amd64")
```
""",
)
Loading