@@ -15,26 +15,27 @@ let
1515 fi
1616 '';
1717
18−desktopApplicationFile = pkgs.writeTextFile {
19− name = "emacsclient.desktop";
20− destination = "/share/applications/emacsclient.desktop";
21− text = ''
22−[Desktop Entry]
23−Name=Emacsclient
24−GenericName=Text Editor
25−Comment=Edit text
26−MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
27−Exec=emacseditor %F
28−Icon=emacs
29−Type=Application
30−Terminal=false
31−Categories=Development;TextEditor;
32−StartupWMClass=Emacs
33−Keywords=Text;Editor;
34−'';
35−};
36−
37−in {
18+ desktopApplicationFile = pkgs.writeTextFile {
19+ name = "emacsclient.desktop";
20+ destination = "/share/applications/emacsclient.desktop";
21+ text = ''
22+ [Desktop Entry]
23+ Name=Emacsclient
24+ GenericName=Text Editor
25+ Comment=Edit text
26+ MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
27+ Exec=emacseditor %F
28+ Icon=emacs
29+ Type=Application
30+ Terminal=false
31+ Categories=Development;TextEditor;
32+ StartupWMClass=Emacs
33+ Keywords=Text;Editor;
34+ '';
35+ };
36+
37+in
38+{
3839
3940 options.services.emacs = {
4041 enable = mkOption {
@@ -86,10 +87,10 @@ in {
8687 description = "Emacs: the extensible, self-documenting text editor";
8788
8889 serviceConfig = {
89− Type = "forking";
90+ Type = "forking";
9091 ExecStart = "${pkgs.bash}/bin/bash -c 'source ${config.system.build.setEnvironment}; exec ${cfg.package}/bin/emacs --daemon'";
91− ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
92− Restart = "always";
92+ ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
93+ Restart = "always";
9394 };
9495 } // optionalAttrs cfg.enable { wantedBy = [ "default.target" ]; };
9596