@@ -15,6 +15,25 @@ 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+
1837in {
1938
2039 options.services.emacs = {
@@ -74,7 +93,7 @@ in {
7493 };
7594 } // optionalAttrs cfg.enable { wantedBy = [ "default.target" ]; };
7695
77− environment.systemPackages = [ cfg.package editorScript ];
96+ environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
7897
7998 environment.variables = {
8099 # This is required so that GTK applications launched from Emacs