Skip to content

Commit

Permalink
home-manager/emacs: fix emacs in Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Nov 8, 2023
1 parent 42f4620 commit 8bf9d0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions home-manager/editor/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
let
inherit (config.home) homeDirectory;
inherit (config.home.sessionVariables) EMACSDIR;
emacs' = with pkgs;
if stdenv.isDarwin then
emacs29-macport
else
emacs29-pgtk.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./disable_pgtk_display_x_warning.patch ];
});
emacs-custom = with pkgs; (pkgs.emacsPackagesFor emacs').emacsWithPackages
(epkgs: with epkgs; [ vterm ]);
emacs' = with pkgs; if stdenv.isDarwin then
emacs29
else
emacs29-pgtk.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./disable_pgtk_display_x_warning.patch ];
});
in
{
options.home-manager.editor.emacs.enable = lib.mkEnableOption "Emacs config" // {
Expand Down Expand Up @@ -52,7 +49,7 @@ in

programs.emacs = {
enable = true;
package = emacs-custom;
package = emacs';
};

xdg.configFile."doom".source = ./doom-emacs;
Expand All @@ -65,7 +62,7 @@ in
Service = with pkgs; {
Nice = "15";
Environment = [
"PATH=${lib.makeBinPath [ bash emacs-custom gcc git ]}"
"PATH=${lib.makeBinPath [ bash emacs' gcc git ]}"
"EMACSDIR=${EMACSDIR}"
];
ExecStart = "${EMACSDIR}/bin/doom sync -u --no-color";
Expand Down
2 changes: 1 addition & 1 deletion home-manager/editor/emacs/doom-emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
;;vterm ; the best terminal emulation in Emacs

:checkers
syntax ; tasing you for every semicolon you forget
Expand Down

0 comments on commit 8bf9d0f

Please sign in to comment.