[feat] add emacs shepherd services
Signed-off-by: SouthFox <master@southfox.me>
This commit is contained in:
parent
e863074b3c
commit
42e327b4e6
2 changed files with 26 additions and 1 deletions
|
@ -34,7 +34,7 @@
|
||||||
(services
|
(services
|
||||||
(list
|
(list
|
||||||
(service oh-my-zsh-service-type '())
|
(service oh-my-zsh-service-type '())
|
||||||
|
(service home-emacs-service-type)
|
||||||
(service home-zsh-service-type
|
(service home-zsh-service-type
|
||||||
(home-zsh-configuration
|
(home-zsh-configuration
|
||||||
(zshrc (list (local-file "files/zshrc")))
|
(zshrc (list (local-file "files/zshrc")))
|
||||||
|
@ -42,3 +42,4 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
24
packages.scm
24
packages.scm
|
@ -4,6 +4,8 @@
|
||||||
(guix git-download)
|
(guix git-download)
|
||||||
(guix utils)
|
(guix utils)
|
||||||
(gnu packages)
|
(gnu packages)
|
||||||
|
(gnu packages emacs)
|
||||||
|
(gnu home services shepherd)
|
||||||
(guix build-system copy)
|
(guix build-system copy)
|
||||||
(gnu services))
|
(gnu services))
|
||||||
|
|
||||||
|
@ -66,3 +68,25 @@ your morning, and an auto-update tool that makes it easy to keep up with the lat
|
||||||
(description
|
(description
|
||||||
"A terminal workspace with batteries included.")
|
"A terminal workspace with batteries included.")
|
||||||
(license expat)))
|
(license expat)))
|
||||||
|
|
||||||
|
(define (home-emacs-shepherd-service config)
|
||||||
|
(list
|
||||||
|
(shepherd-service
|
||||||
|
(documentation "Start Emacs")
|
||||||
|
(provision '(emacs))
|
||||||
|
(auto-start? #t)
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list #$(file-append emacs "/bin/emacs")
|
||||||
|
"--fg-daemon")
|
||||||
|
#:log-file (format #f "~a/.local/var/log/emacs.log" (getenv "HOME"))))
|
||||||
|
(stop #~(make-kill-destructor)))))
|
||||||
|
|
||||||
|
(define home-emacs-service-type
|
||||||
|
(service-type (name 'emacs-configuration)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-shepherd-service-type
|
||||||
|
home-emacs-shepherd-service)))
|
||||||
|
(default-value '())
|
||||||
|
(description "Configures Emacs and installs packages to home-profile.")))
|
||||||
|
|
Loading…
Reference in a new issue