home: services: zsh: Fix zshenv creation.

Fixes a regression introduced by
4935501fd9 that would skip generating
the user's ~/.config/zsh/.zshenv unless both of zshenv and
environment-variables are set in the configuration.

* gnu/home/services/shells.scm (zsh-get-configuration-files):
Generate ~/.config/zsh/.zshenv when only one of zshenv or
environment-variables is specified.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Brian Kubisiak 2022-03-28 18:35:01 -07:00 committed by Ludovic Courtès
parent 9535b62170
commit 032f2e261c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -212,8 +212,8 @@ source ~/.profile
(define (zsh-get-configuration-files config)
`(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty
,@(if (and (zsh-field-not-empty? config 'zshenv)
(zsh-field-not-empty? config 'environment-variables))
,@(if (or (zsh-field-not-empty? config 'zshenv)
(zsh-field-not-empty? config 'environment-variables))
`(("zshenv" ,(zsh-file-by-field config 'zshenv))) '())
,@(if (zsh-field-not-empty? config 'zshrc)
`(("zshrc" ,(zsh-file-by-field config 'zshrc))) '())