1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
Commit graph

9 commits

Author SHA1 Message Date
bruce oberg
64c49b1aa5 home-manager: fix option subcommand
- calls nix-instatiate instead of nixos-option (using nix-option's underlying nix script).
- loops over options to display since nixos-option can only process a single option.
- passes through the --recursive flag from nixos-option. and includes --help and man page for the flag.

details:

nixos-option was changed from a C++ command to a shell script that feeds a nix script (with arguments) to nix-instatiate. in the process, the --config_expr and --options_expr we once passed to nixos-option were removed.

without changing the nixos-option shell script, we have no may to override the arguments to the nixos-option nix script.

luckily, we can use our modulesExpr as a direct argument to the new nixos-option nix script.

unluckily, the nix script does not accept multiple options per instantiation. so we are also looping through the given options ourselves and feeding them each to nixos-option's nix script.

the nixos-option shell and nix scripts are in different places in the nix store, so we have to search the store for the nix script given the location of the shell script.

also, the nixos-option nix script wants a 'recursive' flag, so we now honor that flag for the home-manager option subcommand.
2025-11-03 09:12:22 -06:00
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
Piotr Lewandowski
34a1308614
doc: add a missing subcommand (#7199) 2025-06-03 14:33:17 -05:00
imsuck
229648c51e home-manager: support --log-format flag (#6093)
You can now pass `--log-format FORMAT` to `nix-build`,
useful for piping into `nix-output-monitor`.
2025-03-19 13:32:33 -05:00
Robert Helgesson
f4f8d09f90
home-manager: update copyright year 2025-01-03 10:56:26 +01:00
Scott Stevenson
b319781e30
home-manager: Check VISUAL before EDITOR for editor
Check VISUAL for a visual editor before EDITOR, as per Unix convention
and as followed by Git, crontab, mutt, and other tools.
2024-02-05 23:22:43 +01:00
Viktor Kronvall
b006bf1d74 docs: render DESCRIPTION and OPTIONS headings 2023-12-07 21:28:18 +09:00
Viktor Kronvall
2098c6fe91 docs: no justification in home-manager manpage
The `man home-configuration.nix` is configured to left
align the text similar to `man configuration.nix`. This
commit updates the `man home-manager` page to be consitent
with the two manpages mentioned above.
2023-12-07 21:28:18 +09:00
Viktor Kronvall
728423e6f4 docs: add home-manager manpage 2023-12-07 21:27:38 +09:00