Development Environment
This project provides two options for setting up a development environment with all the linting and development tools used in CI.
Option 1: Nix Flakes (Recommended)
Nix flakes provide a reproducible development environment that works on any Linux distribution.
Prerequisites
Enabling Flakes
If you haven’t enabled flakes, add this to ~/.config/nix/nix.conf:
experimental-features = nix-command flakes
Entering the Development Shell
With direnv (recommended)
foo@bar:~$ direnv allow
One-time use (alternative)
foo@bar:~$ nix develop
Available Tools
The development shell includes all tools used in CI:
| Tool | Purpose |
|---|---|
shellcheck | Bash script linting |
shfmt | Bash script formatting |
nil | Nix language diagnostics |
nixfmt | Nix code formatting |
hadolint | Dockerfile linting |
markdownlint-cli2 | Markdown linting |
cspell | Spell checking |
actionlint | GitHub Actions workflow linting |
yamllint | YAML linting |
podman | Container runtime |
gh | GitHub CLI |
Option 2: VS Code Devcontainer
If you use VS Code and prefer containers over Nix, a devcontainer configuration is included.
Requirements
- VS Code
- Dev Containers extension
- Docker or Podman
Getting Started
- Open the project in VS Code
- When prompted, click “Reopen in Container”
- Or use the command palette:
Dev Containers: Reopen in Container
The devcontainer includes:
- Docker-in-docker for building images
- Nix with
nillanguage server - shellcheck and hadolint
- VS Code extensions for real-time linting feedback