How can I restart a service on Nixos?

独自空忆成欢 提交于 2020-06-26 05:23:14

问题


I've enabled the emacs daemon in my 'nix' config via:

services.emacs.enable = true;

However I'd now like to restart the daemon, due to changing my emacs config.

How can I restart it?

systemctl list-unit-files | grep emacs does not return any results (it would also be useful to know why).

pstree -s emacs
-+= 00001 root systemd 
 \-+= 01301 chris /nix/store/3hmpbbcv1db42m9g34c9g4q6qinw50x4-systemd-237/lib/systemd/systemd --user 
   \-+= 01351 chris /nix/store/zkss82a853cv9d8w9iq25cp26q3jh4fp-emacs-25.3/bin/.emacs-wrapped --daemon 
     \--= 01414 chris /run/current-system/sw/bin/ispell -a -m -B

回答1:


systemctl --user restart emacs


来源:https://stackoverflow.com/questions/53269932/how-can-i-restart-a-service-on-nixos

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!