diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-06-08 14:46:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-06-08 14:46:24 +0200 |
commit | 8c3e9da13a3c92a7db308db8c0d81cb474ad7799 (patch) | |
tree | 88d06952aa5cc3a9c4991d9c43eb7950ff174fe1 /gnu/home/services/shells.scm | |
parent | 5439c04ebdb7b6405f5ea2446b375f1d155a8d95 (diff) | |
parent | 0c5299200ffcd16370f047b7ccb187c60f30da34 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/home/services/shells.scm')
-rw-r--r-- | gnu/home/services/shells.scm | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 7b9769bcf3..fd5a66090d 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -77,7 +77,7 @@ user's customizations. Extend home-shell-profile service only if you really know what you do.")) (define (add-shell-profile-file config) - `(("profile" + `((".profile" ,(mixed-text-file "shell-profile" "\ @@ -211,18 +211,18 @@ source ~/.profile (zsh-serialize-field config field))))) (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)) - `(("zshenv" ,(zsh-file-by-field config 'zshenv))) '()) + `((".zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty + ,@(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))) '()) + `((".zshrc" ,(zsh-file-by-field config 'zshrc))) '()) ,@(if (zsh-field-not-empty? config 'zlogin) - `(("zlogin" ,(zsh-file-by-field config 'zlogin))) '()) + `((".zlogin" ,(zsh-file-by-field config 'zlogin))) '()) ,@(if (zsh-field-not-empty? config 'zlogout) - `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) + `((".zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) -(define (zsh-home-files config) +(define (add-zsh-dot-configuration config) (define zshenv-auxiliary-file (mixed-text-file "zshenv-auxiliary" @@ -230,14 +230,14 @@ source ~/.profile "[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n")) (if (home-zsh-configuration-xdg-flavor? config) - `(("zshenv" ,zshenv-auxiliary-file)) + `((".zshenv" ,zshenv-auxiliary-file)) (zsh-get-configuration-files config))) -(define (zsh-xdg-configuration-files config) +(define (add-zsh-xdg-configuration config) (if (home-zsh-configuration-xdg-flavor? config) (map (lambda (lst) - (cons (string-append "zsh/." (car lst)) + (cons (string-append "zsh/" (car lst)) (cdr lst))) (zsh-get-configuration-files config)) '())) @@ -298,10 +298,10 @@ source ~/.profile (extensions (list (service-extension home-files-service-type - zsh-home-files) + add-zsh-dot-configuration) (service-extension home-xdg-configuration-files-service-type - zsh-xdg-configuration-files) + add-zsh-xdg-configuration) (service-extension home-profile-service-type add-zsh-packages))) @@ -430,7 +430,7 @@ alias grep='grep --color=auto'\n") (field-obj (car (filter-fields field)))) (if (or extra-content (not (null? ((configuration-field-getter field-obj) config)))) - `(,(object->snake-case-string file-name) + `(,(string-append "." (object->snake-case-string file-name)) ,(apply mixed-text-file (object->snake-case-string file-name) (append (or extra-content '()) @@ -439,7 +439,7 @@ alias grep='grep --color=auto'\n") (filter (compose not null?) - `(("bash_profile" + `((".bash_profile" ,(mixed-text-file "bash_profile" "\ @@ -586,7 +586,7 @@ when typed in the shell, will automatically expand to the full text." serialize-fish-abbreviations)) (define (fish-files-service config) - `(("config/fish/config.fish" + `(("fish/config.fish" ,(mixed-text-file "fish-config.fish" #~(string-append "\ @@ -650,7 +650,7 @@ end\n\n") (service-type (name 'home-fish) (extensions (list (service-extension - home-files-service-type + home-xdg-configuration-files-service-type fish-files-service) (service-extension home-profile-service-type |