git.iko.soy/typeable/nixpkgs
on master help sign in
Solving #30396
commit9580f22115dc602ad66b318755937c5444f37d3f authorwucke13 <wucke13@gmail.com> dateTue 27 Feb 2018, 20:18 (9 years ago) parentdfc5d78
1 file changed+20−1
nixos/modules/services/editors/emacs.nix+20−1
nixos/modules/services/editors/emacs.nix+20−1
@@ -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