mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
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
43 lines
1.5 KiB
Text
Executable file
43 lines
1.5 KiB
Text
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/62b852f6c6742134ade1abdd2a21685fd617a291.tar.gz -i bash -p gettext
|
|
|
|
set -euo pipefail
|
|
shopt -s globstar
|
|
|
|
function run() {
|
|
packageName="$1"
|
|
output="$2"
|
|
domain="$3"
|
|
shift 3
|
|
|
|
xgettext -v --package-name="$packageName" \
|
|
--copyright-holder='Home Manager contributors' \
|
|
--msgid-bugs-address=https://github.com/nix-community/home-manager/issues \
|
|
-L Shell -k \
|
|
-k_i:1 --flag=_i:1:c-format \
|
|
-k_iError:1 --flag=_i:1:c-format \
|
|
-k_iWarn:1 --flag=_i:1:c-format \
|
|
-k_iNote:1 --flag=_i:1:c-format \
|
|
-k_iVerbose:1 --flag=_i:1:c-format \
|
|
-k_ip:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipError:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipWarn:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipNote:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipVerbose:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
--add-comments=translators: \
|
|
-o "$output" -d "$domain" "$@"
|
|
}
|
|
|
|
# Files that should be ignored due to various complications. They have been
|
|
# verified not contain any translatable strings.
|
|
GLOBIGNORE="modules/programs/thefuck.nix"
|
|
|
|
run 'Home Manager' \
|
|
home-manager/po/home-manager.pot \
|
|
home-manager \
|
|
home-manager/home-manager home-manager/**/*.nix
|
|
|
|
run 'Home Manager Modules' \
|
|
modules/po/hm-modules.pot \
|
|
hm-modules \
|
|
modules/**/*.{nix,sh}
|