1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-15 17:50:53 +00:00

Set the SHELL environment variable for keychain in .xsession (#3695)

Xsession (and hence ~/.xsession) is executed in bash but does not set
SHELL to the full path to bash. In case the user's login shell is
something other than bash then SHELL is set to that shell. Keychain
inspects the SHELL variable to find out what shell it has to generate
code for, so in .xsession it generates code for the user's login shell
instead for bash.

This change forces SHELL to bash for keychain when invoked from
.xsession, the same way it's done when generating keychain's code for
bash integration.

Closes #3693
This commit is contained in:
siflfran 2023-02-26 19:55:27 +01:00 committed by GitHub
parent fc3432bac2
commit bf76afbb06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ in {
${shellCommand} | parse -r '(\w+)=(.*); export \1' | transpose -ird | load-env
'';
xsession.initExtra = mkIf cfg.enableXsessionIntegration ''
eval "$(${shellCommand})"
eval "$(SHELL=bash ${shellCommand})"
'';
};
}