feat: add emacs daemon

This commit is contained in:
Bastien Riviere 2024-06-28 21:58:28 +02:00
parent 934c332efd
commit 45aca74402
Signed by: babariviere
GPG key ID: 4E5F0839249F162E
2 changed files with 19 additions and 0 deletions

View file

@ -39,6 +39,7 @@ systemctl enable podman.socket
systemctl enable tailscaled.service
systemctl enable -f --global flatpak-setup.service
systemctl enable -f --global azure-topgrade.service
systemctl enable -f --global emacs.service
systemctl enable azure-system-setup.service
systemctl enable azure-groups.service

View file

@ -0,0 +1,18 @@
[Unit]
Description=Emacs text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
ConditionPathExists=%h/.local/bin/distrobox/emacs
[Service]
Type=simple
ExecStart=%h/.local/bin/distrobox/emacs --fg-daemon
ExecStop=%h/.local/bin/distrobox/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh
Environment=COLORTERM=truecolor # force truecolor for emacsclient -nw
Restart=on-failure
RestartSec=5s
StartLimitIntervalSec=30
StartLimitBurst=10
[Install]
WantedBy=default.target