[Nix-dev] Emacs daemon as a user systemd service in NixOS

Luca Bruno lethalman88 at gmail.com
Thu Oct 16 13:28:48 CEST 2014


On 16/10/2014 13:23, Damien Cassou wrote:
>
> thank you very much. Here is my service description now:
>
> systemd.user.services.emacs = {
>     description                 = "Emacs: the extensible,
> self-documenting text editor";
>     environment.GTK_DATA_PREFIX = config.system.path;
>     environment.SSH_AUTH_SOCK   = "%t/keyring/ssh";
>     environment.GTK_PATH        =
> "${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0";
>     serviceConfig               = {
>       Type      = "forking";
>       ExecStart = "${emacs-24}/bin/emacs --daemon";
>       ExecStop  = "${emacs-24}/bin/emacsclient --eval (kill-emacs)";
>       Restart   = "always";
>     };
>     wantedBy = [ "default.target" ];
> };
>
>
>
> My next problem is that DBUS_SESSION_BUS_ADDRESSis not set in this
> emacs service. Do you know how I could set it?
Try https://wiki.archlinux.org/index.php/Systemd/User . There's an
example on how to set it.
>
> Bonus question: would nixos be interested in this file? Should I push
> it in nixpkgs/nixos/modules (or somewhere else)?
It's a nixos service like any other, IMO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141016/3fbf8c52/attachment.html 


More information about the nix-dev mailing list