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 <[email protected]> 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 > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > -- www.debian.org - The Universal Operating System
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
