Add emacs server config
This commit is contained in:
parent
0d6083c4c7
commit
437090ba75
2 changed files with 33 additions and 9 deletions
|
@ -6,21 +6,42 @@
|
|||
}:
|
||||
with lib; let
|
||||
cfg = config.eboskma.programs.emacs;
|
||||
emacs = pkgs.emacsPgtkGcc;
|
||||
orgProtocolDesktop = pkgs.makeDesktopItem {
|
||||
name = "org-protocol";
|
||||
desktopName = "Emacs Org Protocol Handler";
|
||||
icon = "emacs";
|
||||
categories = ["Development" "TextEditor"];
|
||||
keywords = ["org-protocol"];
|
||||
type = "Application";
|
||||
exec = "${emacs}/bin/emacsclient -- %u";
|
||||
terminal = false;
|
||||
mimeTypes = ["x-scheme-handler/org-protocol"];
|
||||
startupWMClass = "Emacs";
|
||||
};
|
||||
in {
|
||||
options.eboskma.programs.emacs = {enable = mkEnableOption "activate emacs";};
|
||||
|
||||
# imports = [ inputs.nix-doom-emacs.hmModule ];
|
||||
options.eboskma.programs.emacs = {
|
||||
enable = mkEnableOption "activate emacs";
|
||||
daemon = mkOption {
|
||||
description = "Whether to enable emacs daemon";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsPgtkGcc;
|
||||
};
|
||||
# programs.doom-emacs = {
|
||||
# enable = true;
|
||||
# emacsPackage = pkgs.emacs-nox;
|
||||
# doomPrivateDir = ./doom.d;
|
||||
# };
|
||||
|
||||
services.emacs = mkIf (cfg.daemon) {
|
||||
enable = true;
|
||||
package = emacs;
|
||||
client.enable = true;
|
||||
socketActivation.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(texlive.combine {
|
||||
|
|
|
@ -53,7 +53,10 @@ in {
|
|||
bat.enable = true;
|
||||
dropbox.enable = true;
|
||||
dunst.enable = true;
|
||||
emacs.enable = true;
|
||||
emacs = {
|
||||
enable = true;
|
||||
daemon = true;
|
||||
};
|
||||
electron = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
|
|
Loading…
Reference in a new issue