home-environment: use nix profile add instead of install

nix profile install was renamed to nix profile add in Nix 2.28.
The old name still works as a deprecated alias but produces a warning
on every home-manager switch:

  warning: 'install' is a deprecated alias for 'add'

Signed-off-by: Bart Smykla <bartek@smykla.com>
This commit is contained in:
Bart Smykla 2026-02-17 14:52:11 +01:00 committed by Robert Helgesson
parent 603626a8da
commit e8d5fc77c2
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
2 changed files with 3 additions and 3 deletions

View file

@ -712,11 +712,11 @@ in
nixProfileRemove 'home-manager-path'
run $oldNix profile install $1
run $oldNix profile add $1
}
if [[ -e ${cfg.profileDirectory}/manifest.json ]] ; then
INSTALL_CMD="nix profile install"
INSTALL_CMD="nix profile add"
INSTALL_CMD_ACTUAL="nixReplaceProfile"
LIST_CMD="nix profile list"
REMOVE_CMD_SYNTAX='nix profile remove {number | store path}'