diff options
| -rw-r--r-- | doc/guix.texi | 8 | ||||
| -rw-r--r-- | gnu/services.scm | 8 | ||||
| -rw-r--r-- | gnu/system.scm | 10 |
3 files changed, 12 insertions, 14 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 38a75b73ceb..fa44f37c050 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -47685,9 +47685,11 @@ create files under @file{/etc/bashrc.d}. It takes as value a list of | |||
| 47685 | file-like objects, as can be produced with @code{local-file}, | 47685 | file-like objects, as can be produced with @code{local-file}, |
| 47686 | @code{plain-file}, etc. Note that provided files whose file names do | 47686 | @code{plain-file}, etc. Note that provided files whose file names do |
| 47687 | not end with @file{.sh} are @emph{not} added to @file{/etc/profile.d/} | 47687 | not end with @file{.sh} are @emph{not} added to @file{/etc/profile.d/} |
| 47688 | and are silently dropped. Package objects can also be provided directly | 47688 | and are silently dropped. The default value is made available via the |
| 47689 | to have their @file{etc/bashrc.d/*.sh} prefixed files added. An example | 47689 | @var{%default-etc-bashrc-d-files} variable for users to extended. |
| 47690 | usage may look like: | 47690 | Package objects can also be provided directly to have their |
| 47691 | @file{etc/bashrc.d/*.sh} prefixed files added. An example usage may | ||
| 47692 | look like: | ||
| 47691 | 47693 | ||
| 47692 | @example | 47694 | @example |
| 47693 | (use-package-modules gnome) ;for the `vte' package | 47695 | (use-package-modules gnome) ;for the `vte' package |
diff --git a/gnu/services.scm b/gnu/services.scm index 7083c88c130..5dbda176b80 100644 --- a/gnu/services.scm +++ b/gnu/services.scm | |||
| @@ -124,6 +124,7 @@ | |||
| 124 | etc-service-type | 124 | etc-service-type |
| 125 | etc-profile-d-service-type | 125 | etc-profile-d-service-type |
| 126 | etc-bashrc-d-service-type | 126 | etc-bashrc-d-service-type |
| 127 | %default-etc-bashrc-d-files | ||
| 127 | etc-directory | 128 | etc-directory |
| 128 | privileged-program-service-type | 129 | privileged-program-service-type |
| 129 | setuid-program-service-type ; deprecated | 130 | setuid-program-service-type ; deprecated |
| @@ -992,6 +993,10 @@ log in."))) | |||
| 992 | (define files->bashrc-d-directory | 993 | (define files->bashrc-d-directory |
| 993 | (make-files->etc-directory "bashrc.d")) | 994 | (make-files->etc-directory "bashrc.d")) |
| 994 | 995 | ||
| 996 | (define %default-etc-bashrc-d-files | ||
| 997 | (list (file-append bash-completion | ||
| 998 | "/etc/profile.d/bash_completion.sh"))) | ||
| 999 | |||
| 995 | (define etc-bashrc-d-service-type | 1000 | (define etc-bashrc-d-service-type |
| 996 | (service-type | 1001 | (service-type |
| 997 | (inherit etc-profile-d-service-type) | 1002 | (inherit etc-profile-d-service-type) |
| @@ -1000,7 +1005,8 @@ log in."))) | |||
| 1000 | files->bashrc-d-directory))) | 1005 | files->bashrc-d-directory))) |
| 1001 | (description "A service for populating @file{/etc/bashrc.d/} with Bash | 1006 | (description "A service for populating @file{/etc/bashrc.d/} with Bash |
| 1002 | scripts having the @file{.sh} file extension, to be sourced by interactive | 1007 | scripts having the @file{.sh} file extension, to be sourced by interactive |
| 1003 | Bash shells."))) | 1008 | Bash shells.") |
| 1009 | (default-value %default-etc-bashrc-d-files))) | ||
| 1004 | 1010 | ||
| 1005 | (define (privileged-program->activation-gexp programs) | 1011 | (define (privileged-program->activation-gexp programs) |
| 1006 | "Return an activation gexp for privileged-program from PROGRAMS." | 1012 | "Return an activation gexp for privileged-program from PROGRAMS." |
diff --git a/gnu/system.scm b/gnu/system.scm index a571fe4fc75..30f55967c43 100644 --- a/gnu/system.scm +++ b/gnu/system.scm | |||
| @@ -969,7 +969,6 @@ of PROVENANCE-SERVICE-TYPE to its services." | |||
| 969 | nvi | 969 | nvi |
| 970 | man-db | 970 | man-db |
| 971 | info-reader ;the standalone Info reader (no Perl) | 971 | info-reader ;the standalone Info reader (no Perl) |
| 972 | bash-completion | ||
| 973 | kbd | 972 | kbd |
| 974 | ;; The 'sudo' command is already in %SETUID-PROGRAMS, but we also | 973 | ;; The 'sudo' command is already in %SETUID-PROGRAMS, but we also |
| 975 | ;; want the other commands and the man pages (notably because | 974 | ;; want the other commands and the man pages (notably because |
| @@ -1155,15 +1154,6 @@ fi | |||
| 1155 | # Provide a default prompt. The user's ~/.bashrc can override it. | 1154 | # Provide a default prompt. The user's ~/.bashrc can override it. |
| 1156 | PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' | 1155 | PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' |
| 1157 | 1156 | ||
| 1158 | # The 'bash-completion' package. | ||
| 1159 | if [ -f /run/current-system/profile/etc/profile.d/bash_completion.sh ] | ||
| 1160 | then | ||
| 1161 | # Bash-completion sources ~/.bash_completion. It installs a dynamic | ||
| 1162 | # completion loader that searches its own completion files as well | ||
| 1163 | # as those in ~/.guix-profile and /run/current-system/profile. | ||
| 1164 | source /run/current-system/profile/etc/profile.d/bash_completion.sh | ||
| 1165 | fi | ||
| 1166 | |||
| 1167 | for i in /etc/bashrc.d/*.sh; do | 1157 | for i in /etc/bashrc.d/*.sh; do |
| 1168 | [[ -r $i ]] && source \"$i\" | 1158 | [[ -r $i ]] && source \"$i\" |
| 1169 | done | 1159 | done |
