unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Auto-start service
@ 2021-07-08 22:28 excalamus--- via
  2021-07-09 12:21 ` Ekaitz Zarraga
  2021-07-09 21:03 ` jbranso
  0 siblings, 2 replies; 7+ messages in thread
From: excalamus--- via @ 2021-07-08 22:28 UTC (permalink / raw)
  To: Help Guix

I'm setting up the Emacs daemon following a thread on the mailing list:        https://lists.gnu.org/archive/html/help-guix/2019-11/msg00148.html. I have services.scm and init.scm defined.  I can call `shepherd -c ~/.config/shepherd/init.scm` and the service starts.  I can kill the terminal and connect a client with `emacsclient -c`.  Trouble is, I can't figure out how to start the service on boot.

The config files I'm using are:

;; services.scm
(define emacsd
  (make <service>
    #:provides '(emacsd)
    #:start (make-system-constructor "emacs --daemon")
    #:stop (make-system-destructor "emacsclient --eval \"(kill-emacs)\"")))

;; init.scm
;;; Shepherd User Services
(load "/home/ahab/.config/shepherd/services.scm")

(register-services
 emacsd)

;; Send shepherd into the background.
(action 'shepherd 'daemonize)

;; Services to start when shepherd starts:
(for-each start '(emacsd))

Based on what (shepherd) Jump Start paragraph 3 says, I'm confused about why Shepard doesn't find the config files.  Is it because Shepherd starts as superuser on boot?

Meanwhile, I was advised to define a service in my config.  I'm in the process of reading the documentation (really, figuring out how to set Geiser up to read the documentation) so that I can understand the relevant parts.  Is the config the generally recommended approach for Guix SD versus the $HOME/.config/shepherd directory?

Surely someone else has set up an Emacs daemon service?  The linked thread mentioned this being a good idea for a cookbook recipe.  I'd be happy to contribute to that as I'm confident I'm not alone in wanting an Emacs daemon service defined.  


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-10 23:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 22:28 Auto-start service excalamus--- via
2021-07-09 12:21 ` Ekaitz Zarraga
2021-07-10  4:13   ` excalamus--- via
2021-07-09 21:03 ` jbranso
2021-07-10  4:15   ` excalamus--- via
2021-07-10 19:53   ` jbranso
2021-07-10 23:18     ` excalamus--- via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).