guix/doc/he-config-bare-bones.scm
Ludovic Courtès 3f900442b4
home: services: bash: Support setting shell variables.
* gnu/home/services.scm (shell-variable-definitions): New procedure.
* gnu/home/services/shells.scm (serialize-shell-variables): New procedure.
(home-bash-configuration)[variables]: New field.
(add-bash-configuration): Honor it.
(home-bash-extension)[variables]: New field.
(home-bash-extensions): Handle ‘variables’.
* doc/guix.texi (Shells Home Services): Update.  Change ‘PS1’ example to use
‘variables’, not ‘environment-variables’.
* doc/he-config-bare-bones.scm: Use ‘variables’ instead of ‘bash-profile’.

Change-Id: I29083d6313d10b1eb9d91eccacfb33efefe60d58
2025-10-23 19:35:07 +02:00

27 lines
940 B
Scheme

(use-modules (gnu home)
(gnu home services)
(gnu home services shells)
(gnu services)
(gnu packages admin)
(guix gexp))
(home-environment
(packages (list htop))
(services
(append (list
(service home-bash-service-type
(home-bash-configuration
(guix-defaults? #t)
(variables
`(("HISTFILE" . "$XDG_CACHE_HOME/.bash_history")
("HISTSIZE" . "50000")))))
(simple-service 'test-config
home-xdg-configuration-files-service-type
(list `("test.conf"
,(plain-file "tmp-file.txt"
"the content of
~/.config/test.conf")))))
%base-home-services)))