con un clic
nix-ci
// Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
// Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
| name | nix-ci |
| description | Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project |
When the user asks to set up CI, use the Ask tool to prompt them to choose:
Use the install-nix action (avoid DetSys actions) and invoke Vira to build:
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v34
- run: nix profile install github:juspay/vira
- run: vira ci
Vira is already running and pointed at the repo. Create a vira.hs file in the repo root to configure the build pipeline.
Before generating vira.hs, you MUST fetch and read https://vira.nixos.asia/config to understand the exact DSL format. Do not guess the syntax.
vira.hssignoff.enable = Trueflake.nix files exist (e.g., in subdirectories), add all of them to build.flakes with appropriate overrideInputs settingscache.url = Nothing with a comment -- TODO: configure Attic cache URLbuild.systems should be set to ["x86_64-linux", "aarch64-darwin"] for multi-platform buildsAfter creating vira.hs, run vira ci -b to verify the configuration.
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast. Covers the zero-inputs flake.nix + npins + default.nix/shell.nix layout, sub-flakes for non-user-facing Nix, and language-specific recommendations.
Use this when a flake's `nix develop` / `direnv allow` / `nix flake archive` is slow on a fresh checkout (the "first time takes 10 minutes" complaint). Diagnoses where the time actually lives and how to shrink the flake.lock input graph without changing build outputs.
Use this when adding Nix-based local runs for an existing Playwright e2e suite. Provides a self-contained `tests/shell.nix` that uses `nixpkgs-latest` for `playwright-driver.browsers`, plus a justfile entry — works on NixOS where `npx playwright install --with-deps` cannot.
Write a programming essay or blog post in the voice of the canon — Spolsky, Yegge, Graham, Mickens, Dijkstra, Brooks, Nystrom, Kleppmann, patio11. Invoke when the user wants to argue an idea about software, architecture, languages, or the craft — not a debugging war story (use debugging-story for that), not a tutorial, not a release note. The audience is working developers worldwide with taste and strong opinions of their own.
Use this when working on a Haskell project with Nix. Covers haskell-flake setup, adding/overriding dependencies, package settings, and devShell configuration.
Use this when diagnosing or fixing a user's Nix installation — checks flakes, version, caches, max-jobs, direnv, rosetta, trusted-users, and shell config