1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00
home-manager/tests/modules/services/emacs/default.nix
Damien Cassou 931653b99f
emacs: optionally start service with the session
Add services.emacs.startWithUserSession boolean to indicate that Emacs
must be started with the systemd user session. This is true by default
unless socket activation is also true.

In the past, the user had to choose between socket activation (to get
the Emacs service started when the user uses emacsclient) and
immediate start with the user session. When choosing immediate start
over socket activation and if the Emacs service is stopped at some
point, using emacsclient would start a new Emacs daemon but the
service would still be turned off. This situation would prevent
`home-manager switch` from completing successfully because it wouldn't
be able to start the Emacs service as Emacs is already running.

This new setting makes it possible to have both socket activation and
immediate start at the same time. In this scenario, Emacs is started
with the user session and, after the Emacs service is stopped, using
emacsclient starts the service again.

This new settings also makes it possible to have neither socket
activation nor immediate start.
2022-06-19 01:09:41 +02:00

9 lines
324 B
Nix

{
emacs-service-27 = ./emacs-service-27.nix;
emacs-service-28 = ./emacs-service-28.nix;
emacs-socket-27 = ./emacs-socket-27.nix;
emacs-socket-28 = ./emacs-socket-28.nix;
emacs-default-editor = ./emacs-default-editor.nix;
emacs-socket-and-startWithUserSession =
./emacs-socket-and-startWithUserSession.nix;
}