mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-04-14 22:04:33 +00:00
home: services: emacs: Don't import (guix config) in gexp.
* modules/rosenthal/home/services/emacs.scm (home-emacs-package): Implement load-profile in home-emacs-program.
This commit is contained in:
parent
5b3539c882
commit
057f66639a
@ -10,6 +10,7 @@
|
|||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix profiles)
|
#:use-module (guix profiles)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
|
#:use-module (guix search-paths)
|
||||||
;; Guix System - services
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
@ -41,19 +42,36 @@ of Emacs extensions."))
|
|||||||
(content (manifest
|
(content (manifest
|
||||||
(cons (package->manifest-entry emacs)
|
(cons (package->manifest-entry emacs)
|
||||||
(manifest-entries packages))))))
|
(manifest-entries packages))))))
|
||||||
|
(home-emacs-search-paths
|
||||||
|
(map search-path-specification->sexp
|
||||||
|
(manifest-search-paths
|
||||||
|
(profile-content home-emacs-profile))))
|
||||||
(home-emacs-program
|
(home-emacs-program
|
||||||
(program-file "home-emacs-program"
|
(program-file "home-emacs-program"
|
||||||
(with-imported-modules
|
(with-imported-modules
|
||||||
;; XXX: (guix profiles) imports (guix config).
|
|
||||||
(source-module-closure
|
(source-module-closure
|
||||||
'((guix profiles)
|
'((guix search-paths)
|
||||||
(guix build utils)))
|
(guix build utils)))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (ice-9 match)
|
(use-modules (ice-9 match)
|
||||||
(guix profiles)
|
(guix search-paths)
|
||||||
(guix build utils))
|
(guix build utils))
|
||||||
(let ((profile #$home-emacs-profile))
|
(let ((profile #$home-emacs-profile))
|
||||||
(load-profile profile)
|
;; See also (@ (guix profiles) load-profile).
|
||||||
|
(for-each
|
||||||
|
(match-lambda
|
||||||
|
((($ <search-path-specification> variable _ separator) . value)
|
||||||
|
(let ((current (getenv variable)))
|
||||||
|
(setenv variable
|
||||||
|
(if current
|
||||||
|
(if separator
|
||||||
|
(string-append value separator current)
|
||||||
|
value)
|
||||||
|
value)))))
|
||||||
|
(evaluate-search-paths
|
||||||
|
(map sexp->search-path-specification
|
||||||
|
'#$home-emacs-search-paths)
|
||||||
|
(list profile)))
|
||||||
(match (command-line)
|
(match (command-line)
|
||||||
((cmd . args)
|
((cmd . args)
|
||||||
(apply system*
|
(apply system*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user