From fbf5cfc59f8eb4802dcb890c43d23fc2e0a38485 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Thu, 31 Oct 2024 21:39:02 +0100 Subject: fix(home): configure bash prompt properly in all shell types --- suweren/home.scm | 30 ++++++++++++++++++++++-------- 1 file 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))))))) -- cgit v1.2.3