moves from emacs-patch overlay to home manager emacs
This commit is contained in:
parent
675795b680
commit
7d8c45c278
3 changed files with 46 additions and 26 deletions
|
|
@ -10,6 +10,10 @@
|
||||||
GOPATH = "$HOME/go";
|
GOPATH = "$HOME/go";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# (aspellWithDicts (dicts: with dicts; [en en-computers en-science]))
|
||||||
|
];
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -20,6 +24,7 @@
|
||||||
../modules/wezterm
|
../modules/wezterm
|
||||||
../modules/nvim
|
../modules/nvim
|
||||||
../modules/lazygit
|
../modules/lazygit
|
||||||
|
../modules/emacs
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
||||||
41
modules/emacs/default.nix
Normal file
41
modules/emacs/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPackages = epkgs: [ epkgs.vterm ];
|
||||||
|
|
||||||
|
package = pkgs.emacs-pgtk.overrideAttrs (
|
||||||
|
final: prev: {
|
||||||
|
# `emacs-28` patches are compatible with `emacs-29`.
|
||||||
|
#
|
||||||
|
# Where a compatible path exists, there is a symlink upstream to keep
|
||||||
|
# things clean, but GitHub doesn't follow symlinks to generate the
|
||||||
|
# responses we need (instead GitHub returns the target of the symlink).
|
||||||
|
patches = (prev.patches or [ ]) ++ [
|
||||||
|
# Fix OS window role (needed for window managers like yabai)
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/fix-window-role.patch";
|
||||||
|
sha256 = "0c41rgpi19vr9ai740g09lka3nkjk48ppqyqdnncjrkfgvm2710z";
|
||||||
|
})
|
||||||
|
# Use poll instead of select to get file descriptors
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/poll.patch";
|
||||||
|
sha256 = "0j26n6yma4n5wh4klikza6bjnzrmz6zihgcsdx36pn3vbfnaqbh5";
|
||||||
|
})
|
||||||
|
# Enable rounded window with no decoration
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/round-undecorated-frame.patch";
|
||||||
|
sha256 = "0x187xvjakm2730d1wcqbz2sny07238mabh5d97fah4qal7zhlbl";
|
||||||
|
})
|
||||||
|
# Make Emacs aware of OS-level light/dark mode
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/system-appearance.patch";
|
||||||
|
sha256 = "14ndp2fqqc95s70fwhpxq58y8qqj4gzvvffp77snm2xk76c1bvnn";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
final: prev: {
|
|
||||||
emacs-patched = prev.emacsPgtk.overrideAttrs (old: {
|
|
||||||
patches = (old.patches or [ ]) ++ [
|
|
||||||
# Fix OS window role (needed for window managers like yabai)
|
|
||||||
(prev.fetchpatch {
|
|
||||||
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/fix-window-role.patch";
|
|
||||||
sha256 = "0c41rgpi19vr9ai740g09lka3nkjk48ppqyqdnncjrkfgvm2710z";
|
|
||||||
})
|
|
||||||
# Use poll instead of select to get file descriptors
|
|
||||||
(prev.fetchpatch {
|
|
||||||
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/poll.patch";
|
|
||||||
sha256 = "0j26n6yma4n5wh4klikza6bjnzrmz6zihgcsdx36pn3vbfnaqbh5";
|
|
||||||
})
|
|
||||||
# Enable rounded window with no decoration
|
|
||||||
(prev.fetchpatch {
|
|
||||||
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/round-undecorated-frame.patch";
|
|
||||||
sha256 = "111i0r3ahs0f52z15aaa3chlq7ardqnzpwp8r57kfsmnmg6c2nhf";
|
|
||||||
})
|
|
||||||
# Make Emacs aware of OS-level light/dark mode
|
|
||||||
(prev.fetchpatch {
|
|
||||||
url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/system-appearance.patch";
|
|
||||||
sha256 = "14ndp2fqqc95s70fwhpxq58y8qqj4gzvvffp77snm2xk76c1bvnn";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue