juspay/ai · Archived

nix-flake

Use this when writing or editing a flake.nix. Covers flake-parts, perSystem, formatter, shell scripts, and package conventions.

First seen Jun 20, 2026

Installation

$ npx skills add juspay/ai --skill nix-flake

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 9
License LICENSE
Default branch main
Open issues 5
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,307 B
  • docs SUMMARY.md 144 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Nix Flake Development with flake-parts

All flakes use flake-parts with perSystem for per-architecture outputs.

Formatter

Always set formatter = pkgs.nixpkgs-fmt.

Shell scripts

Use pkgs.writeShellApplication (not writeShellScriptBin). It enables strict mode and validates runtimeInputs at build time. Always add meta.description.

Key conventions

  • Keep flake.nix minimal — delegate definitions to individual .nix files and import them.
  • perSystem for per-architecture outputs (packages, devShells, checks, formatter).
  • flake (top-level) for arch-independent outputs (nixosConfigurations, lib, overlays).
  • Add meta.description to every package or script.

Language-specific templates

Haskell

Use haskell-template. Key inputs: haskell-flake, nixos-unified, fourmolu-nix. The flake.nix delegates entirely to nixos-unified autowiring, which auto-imports ./nix/modules/flake/*.nix.

Rust

Use rust-nix-template. Key inputs: rust-flake, process-compose-flake. The flake.nix auto-imports all files under ./nix/modules/*.nix using builtins.readDir.

Home Manager, nix-darwin, NixOS

Use nixos-unified-template. Key inputs: home-manager, nix-darwin, nixos-unified. Also uses nixos-unified autowiring.

Dev services

  • process-compose-flake: runs multi-process dev environments (backends, watchers, etc.) via process-compose integrated into a devShell.
  • services-flake: built on top of process-compose-flake; provides ready-made service modules (PostgreSQL, Redis, etc.) for use in dev shells.

Testing pattern

Isolate tests in test/flake.nix to avoid polluting parent. No top-level flake needed — test flake can reference parent content directly:

configDir = builtins.path { path = ./..; name = "config"; };

Use pkgs.testers.nixosTest for NixOS VM tests.