1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-20 17:29:39 +01:00
home-manager/docs/release-notes/rl-2511.md
Robert Helgesson de448dcb57
home-manager: avoid profile management during activation
This commit deprecates profile management from the activation script.
The profile management is instead the responsibility of the driving
software, for example, the `home-manager` tool in the case of
standalone installs.

The legacy behavior is still available for backwards compatibility but
may be removed in the future.

The new behavior resolves (or moves us closer to resolving) a number
of long standing open issues:

- `home-manager switch --rollback`, which performs a rollback to the
  previous Home Manager generation before activating. While it was
  previously possible to accomplish this by activating an old
  generation, it did always create a new profile generation.

  This option has been implemented as part of this commit.

- `home-manager switch --specialisation NAME`, which switches to the
  named specialisation. While it was previously possible to accomplish
  this by manually running the specialisation activate script, it did
  always create a new profile generation.

  This option has been implemented as part of this commit.

- `home-manager switch --test`, which activates the configuration but
  does not create a new profile generation.

  This option has _not_ been implemented here since it relies on the
  current configuration being activated on login, which we do not
  currently do.

- When using the "Home Manager as a NixOS module" installation method
  we previously created an odd `home-manager` per-user "shadow
  profile" for the user. This is no longer necessary.

  This has been implemented as part of this commit.

Fixes #3450
2025-07-22 11:00:18 +02:00

57 lines
2.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Release 25.11 {#sec-release-25.11}
This is the current unstable branch and the information in this
section is therefore not final.
## Highlights {#sec-release-25.11-highlights}
This release has the following notable changes:
- Updating the `home-manager` Nix profile inside the activation script
now deprecated. The profile update is instead the responsibility of
the software calling the activation script, such as the
`home-manager` tool.
The legacy behavior remains the default for backwards compatibility
but may emit a deprecation warning in the future and in the longer
term removed all together. If you have developed tooling that
directly call the generated activation script, then you are
encouraged to adapt to the new behavior. See the
[Activation](#sec-internals-activation) section in the manual for
details on how to call the activation script.
- The `home-manager switch` command now offers a `--rollback` option.
When given, the switch performs a rollback to the Home Manager
generation prior to the current before activating. While it was
previously possible to accomplish this by manually activating an old
generation, it always created a new profile generation. The new
behavior mirrors the behavior of `nixos-rebuild switch --rollback`.
See the [Rollbacks](#sec-usage-rollbacks) section for more.
- The `home-manager switch` command now offers a
`--specialisation NAME` option. When given, the switch activates the
named specialisation. While it was previously possible to accomplish
this by manually running the specialisation `activate` script it was
quite cumbersome and always created a new profile generation. The
new behavior mirrors the behavior of `nixos-rebuild switch
--specialisation`.
- When using Home Manager as a NixOS or nix-darwin module we
previously created an unnecessary `home-manager` per-user "shadow
profile" for the user. This no longer happens. You can restore the
old behavior by adding
``` nix
home-manager.enableLegacyProfileManagement = true;
```
to your configuration. This option is likely to be deprecated in the
future.
## State Version Changes {#sec-release-25.11-state-version-changes}
The state version in this release includes the changes below. These
changes are only active if the `home.stateVersion` option is set to
\"25.11\" or later.
- No changes.