1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-13 18:23:39 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Robert Helgesson
72fc28f1e0
WIP 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 --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
2024-02-20 20:58:55 +01:00
Robert Helgesson
e84811035d
treewide: deprecate VERBOSE_ECHO
The shell function `verboseEcho` can be used in its stead.
2024-01-24 13:36:05 +01:00
Robert Helgesson
4256729006
treewide: deprecate DRY_RUN_CMD and DRY_RUN_NULL
As a replacement, this adds the `run` helper function.
2024-01-24 13:36:05 +01:00
Robert Helgesson
7403ed4980
home-manager: internalize uninstall
This adds a Boolean option `uninstall`. When enabled this option will
reset side-effecting configurations to their "empty" state. The intent
is that this will cause the activation script to remove all managed
files and packages.

Doing it this way should hopefully be more robust than the previous
solution. It also allows a somewhat more convenient uninstall process
when using Flakes; put `uninstall = true` in your existing
configuration and then do a switch.

Also add simple uninstall test in CI test job.
2024-01-13 00:32:31 +01:00
Viktor Kronvall
6fc71dc563 docs: add release-notes as appendix
The release notes used to be an appendix in the manual. After
converting to markdown that appendix got lost. This commit
reintroduces the release notes into the manual.
2023-12-16 15:46:00 +09:00