NixOS for Developers
NixOS is a Linux distribution built on the Nix package manager, designed around a unique "declarative" approach to system configuration.
Unlike traditional distros (Ubuntu, Fedora) where you change settings by running commands or editing files in /etc, NixOS uses a single configuration file to describe the entire state of your machine. The "Nix" Way
- Declarative Configuration: You define your users, packages, networking, and desktop environment in a
.nixfile (usuallyconfiguration.nix). When you apply it, NixOS ensures the system matches that exact description. - Reproducibility: You can take your config file to a brand-new machine, run one command, and have an identical setup—down to the exact versions of every app and system setting.
- Atomic Upgrades & Rollbacks: If an update breaks your system, you can simply choose a previous "generation" at the boot menu to instantly revert to a working state. Every change creates a new, independent version of your system.
- The Nix Store: Packages are stored in
/nix/storewith unique hashes based on their dependencies. This allows multiple versions of the same software to exist simultaneously without conflict.
Key Components (2026)
- Flakes: The modern standard for managing Nix projects. Flakes provide a way to lock dependencies (like specific versions of Nixpkgs) to ensure your build is identical every single time.
- Home Manager: A popular tool used alongside NixOS to manage user-specific configurations (dotfiles, browser extensions, shell aliases) using the same declarative logic.
- Nixpkgs: One of the largest software repositories in existence, often surpassing the Aurora or Arch User Repository (AUR) in total package count.
Why Use It?
- For Developers: Create "per-project" development environments using
nix-shellordevshell. No more "it works on my machine" issues. - For Sysadmins: Manage a fleet of servers using tools like NixOps or Colmena, ensuring every node is configured identically.
- For Enthusiasts: Perfect for people who love to "rice" their desktop (Hyprland, Sway, etc.) because you can't accidentally "brick" your OS beyond repair.
environment.systemPackages = with pkgs; [
nodejs
git
];configure.nix file