CLI Reference
NixOS Configuration Management
Section titled “NixOS Configuration Management”nixos-rebuild
Section titled “nixos-rebuild”sudo nixos-rebuild switch --flake /etc/nixos # Apply current configsudo nixos-rebuild switch --flake /etc/nixos#nixos # Specific configsudo nixos-rebuild dry-activate --flake /etc/nixos # Preview changesnix flake update
Section titled “nix flake update”Updates flake inputs to their latest commits:
nix flake update # Update all inputsnix flake update nixpkgs # Update only nixpkgsnix flake metadata # Show current input versionsnix-version
Section titled “nix-version”Interactively look up package versions from nixpkgs using fzf.
nix-version midea # Search "midea", pick from resultsnix-version # Browse all packages with versionsnix-version -p hello # Direct query: show hello versionnix-version -p python3.pip # Nested attrpath
# Query your own flake instead of nixpkgs:NIX_VERSION_FLAKE=. nix-version -p home-assistant-custom-components.midea_ac_lan| Command | What it does |
|---|---|
nix-version | Interactive fzf browse (all packages) |
nix-version <term> | Search packages matching <term> |
nix-version -p <attrpath> | Direct version lookup, no interaction |