diff --git a/home-manager/modules/emacs/default.nix b/home-manager/modules/emacs/default.nix index 1dcb35a..22fbe06 100644 --- a/home-manager/modules/emacs/default.nix +++ b/home-manager/modules/emacs/default.nix @@ -5,7 +5,8 @@ }: with lib; let cfg = config.eboskma.programs.emacs; - emacs = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ])); + emacsX11 = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ])); + emacsWayland = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ])); orgProtocolDesktop = pkgs.makeDesktopItem { name = "org-protocol"; @@ -14,7 +15,7 @@ with lib; let categories = [ "Development" "TextEditor" ]; keywords = [ "org-protocol" ]; type = "Application"; - exec = "${emacs}/bin/emacsclient -- %u"; + exec = "${cfg.package}/bin/emacsclient -- %u"; terminal = false; mimeTypes = [ "x-scheme-handler/org-protocol" ]; startupWMClass = "Emacs"; @@ -36,7 +37,7 @@ in package = mkOption { description = "The emacs package to install"; type = types.package; - default = emacs; + default = emacsWayland; }; daemon = mkOption { @@ -50,12 +51,12 @@ in config = mkIf cfg.enable { programs.emacs = { enable = true; - package = emacs; + package = cfg.package; }; services.emacs = mkIf cfg.daemon { enable = true; - package = emacs; + package = cfg.package; client.enable = true; socketActivation.enable = true; };