From: excalamus--- via <help-guix@gnu.org>
To: Help Guix <help-guix@gnu.org>
Subject: Auto-start service
Date: Fri, 9 Jul 2021 00:28:54 +0200 (CEST) [thread overview]
Message-ID: <MdsI16a--3-2@tutanota.com> (raw)
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.
next reply other threads:[~2021-07-08 22:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 22:28 excalamus--- via [this message]
2021-07-09 12:21 ` Auto-start service 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MdsI16a--3-2@tutanota.com \
--to=help-guix@gnu.org \
--cc=excalamus@tutanota.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.