Development Environment

This project provides two options for setting up a development environment with all the linting and development tools used in CI.

Nix flakes provide a reproducible development environment that works on any Linux distribution.

Prerequisites

  • Nix with flakes enabled
  • Optionally direnv for automatic shell activation

Enabling Flakes

If you haven’t enabled flakes, add this to ~/.config/nix/nix.conf:

experimental-features = nix-command flakes

Entering the Development Shell

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

Getting Started

  1. Open the project in VS Code
  2. When prompted, click “Reopen in Container”
  3. Or use the command palette: Dev Containers: Reopen in Container

The devcontainer includes:

  • Docker-in-docker for building images
  • Nix with nil language server
  • shellcheck and hadolint
  • VS Code extensions for real-time linting feedback

When rebuilding the container, the old nix store volume needs to be removed first. Use docker volume ls to get the exact name and docker volume rm to remove it.


Table of contents