Awesome Nix

repository·main·Indexed 26 days ago

https://github.com/nix-community/awesome-nix

A curated collection of high-quality resources, tools, and libraries for the Nix and NixOS ecosystem. This directory includes command-line tools for formatting and inspection, development frameworks like flake-utils and nil, DevOps integrations, language-specific toolchains (Python, Rust, Node.js, Haskell), NixOS configuration modules, and deployment tools such as Colmena and NixOps.

Tokens
2.8K
Snippets
0
Records
12
Agent score
40%

What's inside awesome-nix

  1. Learn Nix and NixOS

    main

    The Nix ecosystem offers various learning resources ranging from interactive tutorials to deep-dive books:

  2. Nix tools for Programming Languages

    main

    A collection of tools to integrate various programming languages with the Nix ecosystem, including build systems, dependency converters, and toolchain managers.

    Key Language Integrations

    Python

    • poetry2nix: Build Python packages directly from poetry.lock without a conversion step.
    • uv2nix: Converts uv workspaces into pure Nix derivations.

    Rust

    • crane: Nix library for building Cargo projects with incremental artifact caching.
    • fenix: Provides Rust toolchains and rust-analyzer nightly for Nix.
    • naersk: Builds Rust packages directly from Cargo.lock without conversion.
    • cargo2nix: Provides granular caching and development shells.

    Node.js

    • Napalm: Supports building npm packages with a lightweight npm registry.
    • node2nix: Generates Nix expressions from package.json or package-lock.json.
    • npmlock2nix: Generates Nix expressions from package-lock.json (in-memory) for web projects.

    Haskell

    • cabal2nix: Converts a Cabal file into a Nix build expression.
    • haskell.nix: An alternative Haskell infrastructure for Nixpkgs.
    • haskell-flake: A flake-parts Nix module for Haskell development.

    Other Languages

    • Clojure: clj-nix (helper functions).
    • Crystal: crystal2nix (converts shard.lock).
    • Elixir: deps_nix (converts Mix dependencies).
    • Elm: elm2nix (converts elm.json).
    • OCaml: opam2nix (generates expressions from opam packages).
    • PHP: composer2nix, composer-plugin-nixify, and composition-c4 for Composer integration.
    • Ruby: Bundix and ruby-nix for Bundler integration.
    • Zig: zig2nix (flake for packaging) and zon2nix (converts build.zig.zon).
  3. Explore Development Tools for Nix

    main

    The following tools support Nix-based development workflows, build systems, and language tooling:

    • Flake & Module Frameworks: flake-utils (utility functions), flake-utils-plus (NixOS flake config), flake.parts (modular flakes), flakelight (minimal boilerplate), Conflake (configuration framework), haumea (filesystem-based modules), make-shell (modular mkShell), Snowfall Lib (opinionated file structure), and Standard (DevOps-optimized Flakes framework).
    • Language Servers & Analysis: nil (incremental analysis), nixd (Nix language server), rnix-lsp (syntax-checking LSP), and namaka (snapshot testing).
    • Build & Containerization: Arion (Docker Compose with Nix), compose2nix (Docker Compose to NixOS), dream2nix (convert build systems to Nix), nix2container (efficient container building), nix-oci (OCI container module), and robotnix (Android/AOSP builds).
    • Dependency & Project Management: niv (package pinning), npins (dependency handling), nix-update (version updates), gitignore.nix (Git integration), and templates (project templates).
    • CI, Testing & Quality: Nixtest (testing framework), nixpkgs-review (verify PRs), pre-commit-hooks.nix (commit-time linting), nix-health (install health checks), and pog (CLI creation library).
  4. Nix Overlays and Distributions

    main

    Resources for extending Nixpkgs via overlays or using Nix-based operating system distributions.

    Overlays

    • NUR (Nix User Repositories): A meta-overlay allowing access to various user repositories and package installation via attributes.
    • rust-overlay: Reproducible Nix overlay for binary distributed Rust toolchains.
    • neovim-nightly-overlay: Daily updated Neovim nightly packages.
    • nixpkgs-mozilla: Mozilla's overlay containing Rust toolchains and Firefox.
    • zig-overlay: A Nix flake mirroring official Zig compiler binaries.
    • System Manager: A non-NixOS Linux configuration tool built on Nix.

    Nix-based Distributions

    • NixNG: A GNU/Linux distribution focused on lightweight containers.
    • SnowflakeOS: A NixOS-based distribution designed for beginners.
    • nixbsd: A NixOS fork utilizing the FreeBSD kernel.
  5. Explore DevOps Tools for Nix

    main

    Tools for integrating Nix into DevOps and infrastructure workflows:

    • Nix GitLab CI: Define GitLab CI pipelines in pure Nix with full access to Nix packages and caching.
    • nixidy: Kubernetes GitOps using Nix and Argo CD.
    • Standard: An opinionated Nix Flakes framework designed for large projects and DevOps scenarios, featuring a CLI/TUI.
  6. Explore Command-Line Tools for Nix

    main

    The following CLI tools are available for managing, formatting, and inspecting Nix environments:

    • Formatting & Linting: alejandra (opinionated formatter), nixfmt (uniform style formatter), nixpkgs-hammering (linter for Nixpkgs), statix (linter/fixer for antipatterns), and treefmt-nix (multi-file formatter).
    • Environment & Shell: comma (run binaries via nix run + nix-index), devenv (reproducible dev shells), devbox (portable dev environments), devshell (TOML-based mkShell), flox (manage/share environments), lorri (augmented nix-shell with direnv), and nix-direnv (flake-compliant direnv loader).
    • Inspection & Debugging: dix (fast Nix diff), manix (finds documentation/options), nix-diff (explains derivation differences), nix-du (visualizes GC root deletion), nix-output-monitor (build statistics), nix-tree (dependency graph browser), nvd (diffs package versions between store paths), and optnix (terminal options searcher).
    • Package & Source Management: nix-index (locate packages by file), nix-init (generate packages from URLs), nix-prefetch (update checksums), nurl (generate fetcher calls), and nix-update (update versions/hashes).
    • System & Store Utilities: angrr (auto GC root retention), deadnix (dead code scanner), nix-alien (run unpatched binaries), nix-melt (flake.lock viewer), and nixos-cli (improved UX for NixOS tools).
  7. NixOS Modules and Configuration Tools

    main

    Tools and modules for managing NixOS systems, macOS (via nix-darwin), and user environments.

    System Management

    • Home Manager: Manage user configuration similarly to NixOS.
    • nix-darwin: Manage macOS configuration using Nix.
    • NixOS-WSL: Modules for running NixOS on the Windows Subsystem for Linux.
    • impermanence: Allows selecting specific files and directories to persist between reboots.
    • nix-mineral: Provides hardening for NixOS.
    • NixOS hardware: Optimized NixOS profiles for specific hardware.

    Specialized Modules

    • musnix: For real-time audio work on NixOS.
    • nix-bitcoin: Secure modules and packages for Bitcoin nodes.
    • nix-topology: Generates infrastructure and network diagrams from NixOS configuration.
    • Simple Nixos Mailserver: A complete, module-managed mailserver.
    • Stylix: System-wide colorscheming and typography.
    • base16.nix: Theming programs using base16 colorschemes.

    Configuration Editors

    • Nix Software Center: Desktop app (Rust/GTK) to install and manage Nix packages.
    • NixOS Configuration Editor: Desktop app (Rust/GTK) for graphical NixOS configuration editing.
    • MyNixOS: Web interface for generating Nix flakes and managing configurations for NixOS and Home Manager.