summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services.scm8
-rw-r--r--gnu/system.scm10
2 files changed, 7 insertions, 11 deletions
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
1002scripts having the @file{.sh} file extension, to be sourced by interactive 1007scripts having the @file{.sh} file extension, to be sourced by interactive
1003Bash shells."))) 1008Bash 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.
1156PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' 1155PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '
1157 1156
1158# The 'bash-completion' package.
1159if [ -f /run/current-system/profile/etc/profile.d/bash_completion.sh ]
1160then
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
1165fi
1166
1167for i in /etc/bashrc.d/*.sh; do 1157for i in /etc/bashrc.d/*.sh; do
1168 [[ -r $i ]] && source \"$i\" 1158 [[ -r $i ]] && source \"$i\"
1169done 1159done