This removes the possibility of running `home-manager rollback`. It
was added by mistake at some point and has never worked since it
immediately calls a non-existent function `doRollback`.
Currently translated at 100.0% (39 of 39 strings)
Co-authored-by: TANIGUCHI Kohei <a.d.xvii.kal.mai@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translation: Home Manager/Home Manager CLI
- 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.
This adds a new backupCommand option to allow users to specify a
custom command to run on existing files during activation, as an
alternative to the existing backupFileExtension mechanism.
Adds backupCommand option to NixOS and nix-darwin modules.
Exports HOME_MANAGER_BACKUP_COMMAND environment variable when set.
Updates file activation logic to use the custom backup command if
provided, falling back to the existing backup extension logic.
Updates collision checking and user-facing instructions to
mention the new option.
This enables advanced backup workflows, such as moving files to
trash or archiving with custom tools, before managing them with
Home Manager.
Currently translated at 5.1% (2 of 39 strings)
Add translation using Weblate (Turkish (Ottoman))
Add translation using Weblate (Turkish (Ottoman))
Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ota/
Translation: Home Manager/Home Manager CLI
Currently translated at 100.0% (17 of 17 strings)
Translate using Weblate (Bulgarian)
Currently translated at 100.0% (17 of 17 strings)
Translate using Weblate (Bulgarian)
Currently translated at 100.0% (17 of 17 strings)
Translate using Weblate (Bulgarian)
Currently translated at 100.0% (39 of 39 strings)
Co-authored-by: Borislav Rangelov <borislav.y.rangelov@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/bg/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/bg/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
Currently translated at 97.4% (38 of 39 strings)
Co-authored-by: TANIGUCHI Kohei <a.d.xvii.kal.mai@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ja/
Translation: Home Manager/Home Manager CLI
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
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
Similar to the `nixos-rebuild repl` command, `home-manager repl` will
launch the Nix read-evaluate-print-loop environment with the Home
Manager configuration loaded.
To make that more useful, also add the pkgs and options attributes from
the generated Home Manager configuration to the environment.
This doesn't currently work with flakes, because I don't use them and
I'm not confident I could safely test that function.
* Translate using Weblate (Basque)
Currently translated at 13.5% (5 of 37 strings)
Add translation using Weblate (Basque)
Co-authored-by: Muxutruk <benat.eigurenzu@elorrieta-errekamari.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/eu/
Translation: Home Manager/Home Manager CLI
* Add translation using Weblate (Basque)
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
* Translate using Weblate (Basque)
Currently translated at 50.0% (8 of 16 strings)
Translate using Weblate (Basque)
Currently translated at 21.6% (8 of 37 strings)
Translate using Weblate (Basque)
Currently translated at 25.0% (4 of 16 strings)
Co-authored-by: Muxutruk <benat.eigurenzu@elorrieta-errekamari.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/eu/
Translate-URL: https://hosted.weblate.org/projects/home-manager/modules/eu/
Translation: Home Manager/Home Manager CLI
Translation: Home Manager/Home Manager Modules
---------
Co-authored-by: Muxutruk <benat.eigurenzu@elorrieta-errekamari.com>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Currently translated at 100.0% (37 of 37 strings)
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/home-manager/cli/ca/
Translation: Home Manager/Home Manager CLI
Feature testing flakes / nix-command is more robust over configuration
sniffing. Ultimately, the deciding factor should be if flakes work --
not if the config looks like they will / won't work.
This alternative test both asserts that the `nix` command is enabled,
and that flakes are enabled, without depending on whether or not
flakes are emitted as an experimental feature.
This is both repairing support for Determinate Nix 3, and prepares for
a potential future where Nix itself considers Flakes stable.
Closes#6702
The current way to define a news entry in Home-Manager is error prone
(since you need to type the date manually) and also it is common cause
of conflicts after merges because all entries are defined in the same
file.
This commit fixes this: we can now create individual news entries for
each new entry. A script `create-news-entry.sh` also helps to create it
in the correct format (with the correct filenames and structure).