1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-28 12:49:48 +01:00
home-manager/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 Update nixfmt and apply to a few more files 2020-04-06 12:51:11 +02:00
lib i3status: add module 2020-05-03 13:12:13 +02:00
lib-bash home-manager: add activation sanity check of Nix 2020-05-20 22:32:35 +02:00
misc emacs: Support socket activation via systemd 2020-06-11 20:39:49 +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
targets targets.genericLinux: add module 2020-04-08 13:36:25 +02:00
default.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
files.nix files: reference lndir through xorg 2020-06-06 13:24:51 +02:00
home-environment.nix home-environment: add full locale options support 2020-06-06 21:23:01 +02:00
manual.nix Switch to extended Nixpkg's lib 2020-01-21 20:47:04 +01:00
modules.nix zoxide: add module 2020-05-26 19:14:39 +02:00
systemd-activate.rb systemd: improve systemd-activate.rb script 2020-03-24 00:00:44 +01:00
systemd-activate.sh allow Home Manager to be used as a NixOS module 2018-02-07 20:50:01 +01:00
systemd.nix systemd: don't page failed user units 2020-04-23 23:40:58 +02:00
xcursor.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
xresources.nix xresources: give properties option more specific type 2020-02-29 22:32:52 +01:00
xsession.nix Apply nixfmt on many files 2020-02-02 01:07:28 +01:00