preferences-nix-development

Enforce Nix development conventions for flakes, modules, and platform configurations.

14|Updated May 28, 2024
One-click install
npx skills add https://github.com/cameronraysmith/vanixiets --skill preferences-nix-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preferences-nix-development
Source: https://github.com/cameronraysmith/vanixiets/tree/main/modules/home/ai/skills/src/core/preferences-nix-development
Command: npx skills add https://github.com/cameronraysmith/vanixiets --skill preferences-nix-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance on writing clean, maintainable, and efficient Nix code, ensuring consistency and best practices across Nix development projects.

Core Features & Use Cases

  • Flake Structure: Recommends using flakes for all Nix projects and structuring them modularly with flake-parts.
  • Configuration Patterns: Details how to organize system and user configurations for NixOS, nix-darwin, and home-manager.
  • Code Quality: Emphasizes Nixpkgs naming conventions, formatting with nix fmt, and using explicit function arguments.
  • Use Case: When starting a new Nix project, consult this Skill for guidance on setting up the flake.nix and organizing modules for optimal maintainability.

Quick Start

Follow the Nix development conventions for flake structure and module organization.

Frequently Asked Questions about preferences-nix-development

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

FAQPage Schema
How do I structure a Nix flake for optimal maintainability?

Structure Nix flakes modularly using flake-parts to organize system and user configurations for NixOS, nix-darwin, and home-manager. This enforces Nixpkgs standards and ensures efficient code organization across your development projects.

What are the best practices for Nix module organization?

Nix module organization best practices involve using the unified module system for NixOS, nix-darwin, and home-manager. You should use explicit function arguments, follow Nixpkgs naming conventions, and format your code with nix fmt.

Does this Nix development guidance work with nix-darwin and home-manager?

Yes, Nix development conventions apply directly to projects utilizing NixOS, nix-darwin, and home-manager. The guidance ensures adherence to Nixpkgs standards across these platforms for consistent configuration patterns.

Do I need to understand Nix language features to use these conventions?

Yes, applying these Nix development conventions requires a solid understanding of Nix language features, flake-parts, and the NixOS unified module systems to properly enforce derivation best practices and platform-specific configurations.

When should I use flake-parts in my Nix project?

Use flake-parts when setting up your flake.nix to modularly structure all Nix projects. It is recommended for organizing system and user configurations efficiently while maintaining adherence to Nixpkgs standards.