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

Luca Bruno lethalman88 at gmail.com
Sun Oct 12 15:35:19 CEST 2014


See https://github.com/kiberpipa/nix-rehash . Also I'm not sure systemd
--user is working in nixos yet.

On Sun, Oct 12, 2014 at 3:33 PM, Damien Cassou <damien.cassou at gmail.com>
wrote:

> Hi,
>
> On NixOS, I would like systemd to start emacs (daemon) once and for all so
> that I can just use emacs-client all the times. I put this content in
> ~/.config/systemd/user/emacs.service:
>
> ------------------------------------------------------------------
> [Unit]
> Description=Emacs: the extensible, self-documenting text editor
>
> [Service]
> Type=forking
> ExecStart=/run/current-system/sw/bin/emacs --daemon
> ExecStop=/run/current-system/sw/bin/emacsclient --eval "(kill-emacs)"
> Environment=SSH_AUTH_SOCK=%t/keyring/ssh
> Restart=always
>
> [Install]
> WantedBy=default.target
> ------------------------------------------------------------------
>
> The problem is that many environment variables are missing. For exemple,
> opening any gnome application (e.g., evince) from emacs will result in an
> un-themed window. To fix that I can add the following to the Environment
> property in the service file:
>
>     GTK_DATA_PREFIX=/nix/store/pd7189r7nwwpbsr74fsil5bzjwnm90j9-system-path
>
>
> But this path will change in the future, the GTK_DATA_PREFIX variable
> being defined as
>
>     GTK_DATA_PREFIX=${config.system.path}
>
>
> How can I define an Emacs daemon user-based systemd service in NixOS?
>
> Thank you very much
>
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without losing
> enthusiasm."
> Winston Churchill
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>


-- 
www.debian.org - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141012/d8457536/attachment.html 


More information about the nix-dev mailing list