Files
home-manager/docs/manual/usage/updating.md
T
6dc9e081ba docs: fix cross-page links broken by mdbook migration
The mdBook migration split the manual into one HTML page per section,
but same-page fragment links (e.g. [Standalone setup](#sec-flakes-standalone))
were left pointing at anchors that now live on other pages, so they
silently do nothing when clicked.

Rewrite all cross-page fragment links in docs/manual and
docs/release-notes to page-qualified relative links. Option anchor
links (#opt-*, #nixos-opt-*, #nix-darwin-opt-*) are untouched since
convert-markup.py rewrites those at build time.

Also give the previously empty-label [](#sec-tests) link in the 25.05
release notes a "Tests" label, since the mdBook renderer does not
auto-fill labels from the target heading.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 08:56:06 -05:00

2.1 KiB

Updating

Updating means moving to a newer revision of the Home Manager branch that your configuration already follows. For example, a configuration using release-25.11 can update to a newer revision of release-25.11 without changing release branches.

If you want to move from one release branch to another, such as release-25.05 to release-25.11, or between a release branch and master, see Upgrading to a new Home Manager release.

Flake-Based Configurations

Flake inputs are pinned in flake.lock, and Home Manager will keep using the pinned revisions until you update that lock file.

To update all inputs in the flake:

$ nix flake update

To update only specific inputs, name them explicitly:

$ nix flake update home-manager nixpkgs

These commands assume that your current directory is the flake. If not, pass the flake path or URI with --flake <flake-uri>.

After updating the lock file, rebuild with the command for your installation method.

For a standalone Home Manager flake:

$ home-manager switch --flake .

For Home Manager as a NixOS module:

$ sudo nixos-rebuild switch --flake .

For Home Manager as a nix-darwin module:

$ darwin-rebuild switch --flake .

Channel-Based Configurations

Channels are mutable references outside the Home Manager configuration itself. Updating a channel moves it to a newer revision of the same channel or branch.

For a standalone Home Manager channel installation, update the user's channels and then switch:

$ nix-channel --update
…
unpacking channels...
$ home-manager switch

For Home Manager as a NixOS module, update the root user's Home Manager channel and rebuild the system:

$ sudo nix-channel --update home-manager
$ sudo nixos-rebuild switch

For Home Manager as a nix-darwin module, update the Home Manager channel used by your nix-darwin configuration and rebuild the system:

$ nix-channel --update home-manager
$ darwin-rebuild switch