home: services: configuration: Support file-like objects.

* gnu/home/services/configuration.scm (interpose): Operate only with file-like
objects.
(string-or-gexp?): Delete procedure.
(serialize-string-or-gexp): Rename to 'serialize-file-like'.
(text-config?): Call 'file-like' intead of 'string-or-gexp?'.
* guix/scripts/home/import.scm:
(generate-bash-module+configuration): Don't call slurp-file-gexp.
* gnu/home/services/configuration.scm: Move content ...
* gnu/services/configuration.scm: here.
* gnu/home/services/shells.scm: Delete (gnu home services configuration).
* gnu/home/services/xdg.scm: Same.
* gnu/local.mk: Same.
* tests/guix-home.sh:
Test home-bash-service-type and extension with home-bash-extension.
This commit is contained in:
Oleg Pykhalov 2021-10-02 19:05:02 +03:00
parent 5e68f7a7b3
commit fee0bced7f
No known key found for this signature in database
GPG key ID: 167F8EA5001AFA9C
7 changed files with 117 additions and 120 deletions

View file

@ -46,17 +46,15 @@
(home-bash-configuration
,@(if (file-exists? rc)
`((bashrc
(list (slurp-file-gexp (local-file ,rc)))))
(list (local-file ,rc))))
'())
,@(if (file-exists? profile)
`((bash-profile
(list (slurp-file-gexp
(local-file ,profile)))))
(list (local-file ,profile))))
'())
,@(if (file-exists? logout)
`((bash-logout
(list (slurp-file-gexp
(local-file ,logout)))))
(list (local-file ,logout))))
'()))))))