nixos/emacs: formatted with nixpkgs-fmt

paumr d4203693 f299f5d6

Changed files
+23 -22
nixos
modules
services
editors
+23 -22
nixos/modules/services/editors/emacs.nix
···
fi
'';
-
desktopApplicationFile = pkgs.writeTextFile {
-
name = "emacsclient.desktop";
-
destination = "/share/applications/emacsclient.desktop";
-
text = ''
-
[Desktop Entry]
-
Name=Emacsclient
-
GenericName=Text Editor
-
Comment=Edit text
-
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++;
-
Exec=emacseditor %F
-
Icon=emacs
-
Type=Application
-
Terminal=false
-
Categories=Development;TextEditor;
-
StartupWMClass=Emacs
-
Keywords=Text;Editor;
-
'';
-
};
+
desktopApplicationFile = pkgs.writeTextFile {
+
name = "emacsclient.desktop";
+
destination = "/share/applications/emacsclient.desktop";
+
text = ''
+
[Desktop Entry]
+
Name=Emacsclient
+
GenericName=Text Editor
+
Comment=Edit text
+
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++;
+
Exec=emacseditor %F
+
Icon=emacs
+
Type=Application
+
Terminal=false
+
Categories=Development;TextEditor;
+
StartupWMClass=Emacs
+
Keywords=Text;Editor;
+
'';
+
};
-
in {
+
in
+
{
options.services.emacs = {
enable = mkOption {
···
description = "Emacs: the extensible, self-documenting text editor";
serviceConfig = {
-
Type = "forking";
+
Type = "forking";
ExecStart = "${pkgs.bash}/bin/bash -c 'source ${config.system.build.setEnvironment}; exec ${cfg.package}/bin/emacs --daemon'";
-
ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
-
Restart = "always";
+
ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
+
Restart = "always";
};
} // optionalAttrs cfg.enable { wantedBy = [ "default.target" ]; };