nix

Provide guidelines and tools for writing Nix expressions, modules, flakes, and packages.

Updated May 3, 2025
One-click install
npx skills add https://github.com/taylrfnt/dotfiles --skill nix-taylrfnt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix
Source: https://github.com/taylrfnt/dotfiles/tree/main/modules/hjem/files/amp/skills/nix
Command: npx skills add https://github.com/taylrfnt/dotfiles --skill nix-taylrfnt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires alejandra, nix, nixpkgs, flake-parts, import-tree, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps streamline Nix project development and configuration management by providing guidelines, best practices, and tools for writing Nix expressions, modules, flakes, and packages.

Core Features & Use Cases

  • Guidance for Nix Expressions: Offers comprehensive guidance for writing Nix expressions, NixOS modules, flakes, and packages.
  • Code Quality Checks: Provides instructions for running code quality checks and security scans.
  • Project Structure: Offers a canonical flake-based layout for Nix projects.
  • Testing: Includes guidance on evaluating and building Nix projects, including testing and versioning.
  • Packaging: Provides information on creating standard derivations and overlays.
  • Development Shells: Offers instructions for setting up reproducible development environments.
  • Dotfiles & Config Management: Recommends using hjem for user-level dotfiles and config management.

Quick Start

Use the nix skill to format your Nix code with 'alejandra .'.

Frequently Asked Questions about nix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a flake-based Nix project?

To structure a flake-based Nix project, use a canonical flake layout to organize Nix expressions, modules, and packages. This provides a standard project structure for development and configuration management.

What's the best way to format Nix expressions?

The best way to format Nix expressions is using the Alejandra formatter. Run `alejandra .` to automatically apply code quality checks and standard formatting to your Nix codebase.

How do I create reproducible development shells with Nix?

To create reproducible development shells with Nix, follow provided instructions for setting up standard derivations. This isolates dependencies and ensures consistent environments across different systems.

Can I use Nix for user-level dotfiles and config management?

Yes, you can use Nix for user-level dotfiles and config management. The Skill recommends using Hjem specifically for managing user-level dotfiles and configuration files.

How do I evaluate and test Nix packages?

To evaluate and test Nix packages, use the included guidance on building Nix projects. This covers testing and versioning to ensure your packages and modules function correctly before deployment.