宋文武 <iyzs...@gmail.com> skribis:

> Currently, zsh doesn't work out of box.

On the standalone system, right?

> IMO, we should use `/etc/environment' for system variables:
>     LANG=en_US.UTF-8
>     PATH=/run/current-system/profile/bin:/run/setuid-programs
> And add `pam_env.so' to /etc/pam.d/login, to make tty login work.
>
> With `/etc/profile', `/etc/zlogin' just:
>     source /etc/environment
> to make `bash -l' and `zsh -l' work.

Is ‘pam env’ needed at all if /etc/profile and /etc/zlogin are provided
anyway?

> And `~/.bash_profile', `~/.zlogin' for user variables:
>     [[ $- == *i* ]] && source ~/.bashrc # only for bash
>     
>     export PATH=$PATH:$HOME/.guix-profile/bin

OK.  It would be best to have $HOME/.guix-profile/bin in PATH installed
by /etc/{profile,zlogin}, though, so that it works out of the box.

> Use `~/.bashrc', `~/.zshrc' for interactive settings:
>     PS1='$ '
>     alias ls='ls -p --color'
>     # $(guix package --search-paths)?

OK.

Thanks for the very good summary!  I never had this clear an
understanding of all this.

Would you like to submit a patch?  The relevant parts are in (gnu
system) for /etc/profile, in (gnu system shadow) for the .bashrc
template, and in (gnu services base) for the PAM settings of the ‘login’
command.

Ludo’.

Reply via email to