Ensure daemon inherits zshenv-set envars

This commit is contained in:
TEC 2022-10-08 02:45:48 +08:00
parent 83da4f90bc
commit ea60b9ff17
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 4 additions and 2 deletions

View File

@ -2561,7 +2561,9 @@ doom= then as soon as I make a change it will become =config.org ◉ doom=.
*** Systemd daemon
For running a systemd service for a Emacs server I have the following
For running a systemd service for a Emacs server I have the following. =zsh -c= is
used to ensure that =.zshenv= is loaded.
#+name: emacsclient service
#+begin_src systemd :tangle ~/.config/systemd/user/emacs.service :mkdirp yes
[Unit]
@ -2570,7 +2572,7 @@ Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
[Service]
Type=forking
ExecStart=sh -c 'emacs --daemon && emacsclient -c --eval "(delete-frame)"'
ExecStart=zsh -c 'emacs --daemon && emacsclient -c --eval "(delete-frame)"'
ExecStop=/usr/bin/emacsclient --no-wait --eval "(progn (setq kill-emacs-hook nil) (kill emacs))"
Environment=COLORTERM=truecolor
Restart=on-failure