diff options
author | paumr <paum@bdisk.eu> | 2020-05-09 11:36:06 +0200 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-08-16 10:22:56 +0000 |
commit | d4203693549d20d062db253b087780df93ac66c5 (patch) | |
tree | c58c052b20f91a1f1634be83d57b5eeb4c5b84ba | |
parent | f299f5d6a4449d980909d803186526eeb565ee1f (diff) | |
download | nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar.gz nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar.bz2 nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar.lz nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar.xz nixpkgs-d4203693549d20d062db253b087780df93ac66c5.tar.zst nixpkgs-d4203693549d20d062db253b087780df93ac66c5.zip |
nixos/emacs: formatted with nixpkgs-fmt
-rw-r--r-- | nixos/modules/services/editors/emacs.nix | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/nixos/modules/services/editors/emacs.nix b/nixos/modules/services/editors/emacs.nix index d791b387665..00d9eaad9eb 100644 --- a/nixos/modules/services/editors/emacs.nix +++ b/nixos/modules/services/editors/emacs.nix @@ -15,26 +15,27 @@ let 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; -''; -}; - -in { + 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 +{ options.services.emacs = { enable = mkOption { @@ -86,10 +87,10 @@ in { 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" ]; }; |