Available Libraries
Flake Utilities
mkFlake
Simplify multi-system flake outputs (like flake-utils)
mkChecks
Transform check definitions into flake checks
mkApps
Convert script definitions into flake apps
Language-Specific Utilities
Go
Cross-compile Go applications to any platform
Rust
Cross-compile Rust using cargo-zigbuild
Deno
Compile TypeScript/JavaScript to standalone binaries
Gleam
Build Gleam projects for Erlang or JavaScript targets
Protocol Buffers
Buf
Fetch and manage Buf dependencies in Nix builds
Usage Pattern
All libraries are available through the Nur Nix flake:Design Philosophy
Pure Nix Functions
All utilities in thelibs/ directory are pure Nix functions that don’t depend on pkgs. This makes them:
- Reusable across different nixpkgs versions
- Easy to test and reason about
- Suitable for use in flake schemas
Override-Friendly
Most functions uselib.makeOverridable so you can customize behavior:
Minimal Boilerplate
These libraries eliminate repetitive patterns:- Without mkFlake: Manually map over systems, merge attrsets
- With mkFlake: Single function call handles all systems
- Without mkApps: Write derivations with install phases
- With mkApps: Just provide a script
Next Steps
Flake Utilities
Start with mkFlake to simplify your flake structure
Cross-Compilation
Learn how to cross-compile applications
