Skip to content

feat: introduce Nix environment and Playwright Docker browser setup#2405

Open
jcscottiii wants to merge 2 commits intomainfrom
nix
Open

feat: introduce Nix environment and Playwright Docker browser setup#2405
jcscottiii wants to merge 2 commits intomainfrom
nix

Conversation

@jcscottiii
Copy link
Copy Markdown
Collaborator

This commit introduces Nix as an alternative development environment to DevContainers and sets up an isolated Playwright browser server in Docker to ensure repeatable E2E screenshots. It also updates all relevant documentation and agent skills to reflect the new workflow.

KEY CHANGES

Environment and Tooling:

  • Added flake.nix and flake.lock to define the Nix development environment with pinned tools (Go, Node, Terraform, etc.).
  • Added .envrc to support automatic environment loading via direnv.
  • Updated .gitignore to exclude .direnv, .envrc, and cached Nix browsers.

Playwright and E2E Testing:

  • Created images/playwright.Dockerfile to run a Playwright browser server isolated in a container.
  • Added global-setup.ts to build and manage the Playwright container during tests.
  • Updated playwright.config.ts to connect to the remote Docker browser by default when running under Nix.
  • Added playwright-docker-stop target to Makefile for cleanup.

CI/CD and Documentation:

  • Added .github/workflows/ci-nix.yml to run continuous integration tests inside the Nix environment.
  • Created docs/nix-setup.md with instructions for using the new environment.
  • Updated README.md, DEVELOPMENT.md, and docs/maintenance.md to reference Nix.
  • Updated GEMINI.md to track the addition of the Nix environment.

Agent Skills:

  • Updated all 8 skill files in .agent/skills/ to provide correct guidance for both DevContainer and Nix workflows, including tool management and container runtime requirements.

Corrected Assumptions and Learnings:

  • Discovered that the VS Code direnv extension conflicts with host shell hooks, causing PATH clobbering. Updated docs to recommend relying on the shell hook instead.

This commit introduces Nix as an alternative development environment to DevContainers and sets up an isolated Playwright browser server in Docker to ensure repeatable E2E screenshots. It also updates all relevant documentation and agent skills to reflect the new workflow.

KEY CHANGES

Environment and Tooling:
- Added flake.nix and flake.lock to define the Nix development environment with pinned tools (Go, Node, Terraform, etc.).
- Added .envrc to support automatic environment loading via direnv.
- Updated .gitignore to exclude .direnv, .envrc, and cached Nix browsers.

Playwright and E2E Testing:
- Created images/playwright.Dockerfile to run a Playwright browser server isolated in a container.
- Added global-setup.ts to build and manage the Playwright container during tests.
- Updated playwright.config.ts to connect to the remote Docker browser by default when running under Nix.
- Added playwright-docker-stop target to Makefile for cleanup.

CI/CD and Documentation:
- Added .github/workflows/ci-nix.yml to run continuous integration tests inside the Nix environment.
- Created docs/nix-setup.md with instructions for using the new environment.
- Updated README.md, DEVELOPMENT.md, and docs/maintenance.md to reference Nix.
- Updated GEMINI.md to track the addition of the Nix environment.

Agent Skills:
- Updated all 8 skill files in .agent/skills/ to provide correct guidance for both DevContainer and Nix workflows, including tool management and container runtime requirements.

Corrected Assumptions and Learnings:
- Discovered that the VS Code direnv extension conflicts with host shell hooks, causing PATH clobbering. Updated docs to recommend relying on the shell hook instead.
- Found that the Nix package for Go 1.26.1 still reports as 1.26.0 in its binary, which is an upstream quirk we are tracking but ignoring for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants