Weyl Standard Nix
A specification for building reproducible, composable infrastructure on Nix with flakes, flake-parts, and consistent naming conventions.
Weyl Standard Nix
Weyl Standard Nix is a specification for building reproducible, composable infrastructure on Nix. Part of the Weyl Standard collection of language standards.
Core Principles
- Flakes exclusively - No legacy Nix, no
nix-shell, noNIX_PATH - flake-parts as foundation - Module system for flakes
- nixos-unified structure - Autowiring over boilerplate
- Overlays for packages - Centrally managed nixpkgs
- lisp-case everywhere - Consistent naming across identifiers
Philosophy
- Why Nix — The case for reproducibility
- The Overlay — Universe transformers
- lisp-case — Naming convention rationale
Guides
Getting Started
- Installation — Prerequisites and setup
- First Flake — Your first conformant flake
- Infrastructure — Cachix, Hercules CI, Omnix
Patterns
- Naming Conventions — How to name things
- File Placement — Where things go
- Module Systems — flake-parts, NixOS, darwin
- Writing Packages — callPackage, finalAttrs
- Writing Modules — Options, config, mkIf
- Testing — nix flake check, NixOS tests
- Documentation — Comments, assertions, errors
- Forbidden Patterns — What not to do
Advanced
- Standard Environments — Custom build environments
- Overlays — Package set transformations
- Cross-Compilation — Multi-platform builds
RFCs
- RFC 001: Weyl Standard Nix — Core specification
- RFC 002: wsn-lint — Linting and enforcement
Reference
“The Nix model of reproducible builds, declarative configuration, and content-addressed storage is correct. The particular stylistic choices of nixpkgs are not load-bearing.”
— RFC-001