Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 5, 2026·3 min de lectura

Nix — Reproducible Package Manager and Build System

A purely functional package manager that ensures reproducible builds and atomic upgrades across Linux and macOS, powering NixOS and developer environments.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Nix
Comando CLI universal
npx tokrepo install 197d54ef-48c0-11f1-9bc6-00163e2b0d79

Introduction

Nix is a purely functional package manager where each package is built in isolation from a precise description of its dependencies. This model guarantees reproducible builds, atomic upgrades and rollbacks, and the ability to run multiple versions of any package side by side without conflicts.

What Nix Does

  • Builds and installs packages in isolation under /nix/store with content-addressed paths
  • Provides atomic upgrades and instant rollbacks for system and user profiles
  • Manages per-project development environments via nix-shell or nix develop
  • Powers NixOS, a Linux distribution where the entire system is declared in a single configuration file
  • Caches and shares build results through binary substitution from remote caches

Architecture Overview

Every Nix package is defined by a derivation — a pure function from inputs (source, dependencies, build script) to a store path. The Nix store (/nix/store) holds all build outputs, each identified by a hash of its inputs. A build daemon executes derivations in sandboxed environments. Profiles are symlink trees pointing into the store, making switches atomic.

Self-Hosting & Configuration

  • Install with the official installer on any Linux distribution or macOS
  • Configure in /etc/nix/nix.conf or ~/.config/nix/nix.conf for substituters and features
  • Enable Flakes with experimental-features = nix-command flakes for the modern CLI
  • Use binary caches (cache.nixos.org or custom) to avoid rebuilding from source
  • Declare project dependencies in a flake.nix for portable reproducible environments

Key Features

  • Content-addressed store ensures bit-for-bit reproducible builds
  • Atomic upgrades with instant rollback to any previous generation
  • Multiple package versions coexist without conflicts or containers
  • Flakes provide hermetic, lockfile-based project definitions
  • Cross-compilation support for dozens of target platforms

Comparison with Similar Tools

  • Homebrew — simpler to start; no reproducibility guarantees or rollback support
  • apt/dnf — distribution-native; global state makes version conflicts common
  • Guix — similar functional model using Guile Scheme instead of the Nix language
  • Docker — provides isolation via containers; heavier weight than Nix shells for development

FAQ

Q: Do I need NixOS to use Nix? A: No. Nix runs as a package manager on any Linux distribution and on macOS.

Q: What are Flakes? A: Flakes are a newer interface for defining Nix projects with a lockfile for pinned dependencies, making builds fully reproducible across machines.

Q: Does Nix work on macOS? A: Yes. Nix supports macOS with a dedicated installer and the nix-darwin module for system configuration.

Q: How much disk space does the Nix store use? A: It varies. Run nix-collect-garbage -d to remove unused store paths and reclaim space.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados