1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/tests/modules
Tad Fisher 3815248786
emacs: Support socket activation via systemd
Add 'services.emacs.socketActivation.enable' for generating an
'emacs.socket' systemd unit.

Emacs since version 26 has supported socket activation, whereby an
external process manager such as systemd listens on a socket and passes
it to the Emacs daemon when the manager launches it. This improves
startup time of the user session and avoids launching the daemon when not
needed, for example when launching the user session via SSH.

This implementation hard-codes the socket path to the default for the
version of 'programs.emacs.finalPackage', because systemd does not
perform shell expansion in the socket unit's 'ListenStream' parameter
and it seems like an advanced use-case to change the socket path. Shell
expansion would be desirable as the socket path usually resides in
directories such as $XDG_RUNTIME_DIR or $TMPDIR.

Tests were added to verify behavior in the following cases:

- Emacs service with socket activation disabled
- Emacs 26 with socket activation enabled
- Emacs 27 with socket activation enabled

PR #1314
2020-06-11 20:39:49 +02:00
..
accounts git: quote sendemail section header 2019-01-29 18:28:55 +01:00
files files: add helper function mkOutOfStoreSymlink 2020-05-02 01:22:14 +02:00
home-environment tests: improve test purity 2020-04-24 21:46:34 +02:00
misc tests: improve test purity 2020-04-24 21:46:34 +02:00
programs autorandr: add crtc option 2020-06-09 23:15:44 +02:00
services emacs: Support socket activation via systemd 2020-06-11 20:39:49 +02:00
systemd tests: update nmt 2020-04-10 01:01:20 +02:00
targets tests: improve test purity 2020-04-24 21:46:34 +02:00
xresources Apply nixfmt on many files 2020-02-02 01:07:28 +01:00