diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-10-31 21:39:02 +0100 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-10-31 21:39:02 +0100 |
commit | fbf5cfc59f8eb4802dcb890c43d23fc2e0a38485 (patch) | |
tree | bb1b1f56b193300e6e8802934a392d138c964275 | |
parent | 0d37e58b1d0061831d7dbfcf12f3c7118b938fe8 (diff) |
fix(home): configure bash prompt properly in all shell types
-rw-r--r-- | suweren/home.scm | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/suweren/home.scm b/suweren/home.scm index f7bee00..cd31e2d 100644 --- a/suweren/home.scm +++ b/suweren/home.scm @@ -53,8 +53,14 @@ ;; update-commands #:use-module (suweren update)) -;; string -> -;; (record service) +(define bash-prompt-configuration + (guix:gexp:mixed-text-file "newline-prompt" + "PS1=${PS1%?}\n" + "PS1=${PS1%?}\\n'$ '\n" + "PS1=\"\\n$PS1\"")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (define-public (%suweren-home-services host-name*) (let* ((packages (list easyeffects font-google-noto @@ -83,12 +89,20 @@ suweren-home-fontconfig-service-type update-commands* (simple-service - 'bash-extension + 'environment-variables + home-environment-variables-service-type + `(("EDITOR" . "emacs"))) + (simple-service + 'bash-aliases + home-bash-service-type + (home-bash-extension + (aliases + `(("edit" . "$EDITOR"))))) + (simple-service + 'bash-prompt gnu:home:services:shells:home-bash-service-type (gnu:home:services:shells:home-bash-extension (bash-profile - (list - (guix:gexp:mixed-text-file "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\"")))))))) + (list bash-prompt-configuration)) + (bashrc + (list bash-prompt-configuration))))))) |