mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
home-environment: deprecate option home.sessionVariableSetter
This commit is contained in:
parent
d7755de116
commit
18159c85b9
2 changed files with 59 additions and 2 deletions
|
@ -159,8 +159,8 @@ in
|
|||
};
|
||||
|
||||
home.sessionVariableSetter = mkOption {
|
||||
default = "bash";
|
||||
type = types.enum [ "pam" "bash" "zsh" ];
|
||||
default = null;
|
||||
type = types.nullOr (types.enum [ "pam" "bash" "zsh" ]);
|
||||
example = "pam";
|
||||
description = ''
|
||||
Identifies the module that should set the session variables.
|
||||
|
@ -171,6 +171,9 @@ in
|
|||
If "pam" is set then PAM must be used to set the system
|
||||
environment. Also mind that typical environment variables
|
||||
might not be set by the time PAM starts up.
|
||||
</para><para>
|
||||
This option is DEPRECATED, the shell modules are now
|
||||
automatically setting the session variables when enabled.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -478,6 +478,60 @@ in
|
|||
necessary.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2018-01-08T20:39:56+00:00";
|
||||
condition = config.home.sessionVariableSetter != null;
|
||||
message =
|
||||
let
|
||||
opts = {
|
||||
bash = ''
|
||||
Instead the 'programs.bash' module will, when enabled,
|
||||
automatically set session variables. You can safely
|
||||
remove the 'home.sessionVariableSetter' option from your
|
||||
configuration.
|
||||
'';
|
||||
|
||||
zsh = ''
|
||||
Instead the 'programs.zsh' module will, when enabled,
|
||||
automatically set session variables. You can safely
|
||||
remove the 'home.sessionVariableSetter' option from your
|
||||
configuration.
|
||||
'';
|
||||
|
||||
pam = ''
|
||||
Unfortunately setting general session variables using
|
||||
PAM will not be directly supported after this date. The
|
||||
primary reason for this change is its limited support
|
||||
for variable expansion.
|
||||
|
||||
To continue setting session variables from the Home
|
||||
Manager configuration you must either use the
|
||||
'programs.bash' or 'programs.zsh' modules or manually
|
||||
source the session variable file
|
||||
|
||||
$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
|
||||
within your shell configuration, see the README file for
|
||||
more information. This file requires a Bourne-like shell
|
||||
such as Bash or Z shell but hopefully other shells
|
||||
will be supported in the future.
|
||||
|
||||
If you specifically need to set a session variable using
|
||||
PAM then the new option 'pam.sessionVariables' can be
|
||||
used. It works much the same as 'home.sessionVariables'
|
||||
but its attribute values must be valid within the PAM
|
||||
environment file.
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
The 'home.sessionVariableSetter' option is now deprecated
|
||||
and will be removed on February 8, 2018.
|
||||
|
||||
${opts.${config.home.sessionVariableSetter}}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue