-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
emacs: simplifications for darwin portability
- Loading branch information
Showing
8 changed files
with
286 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
{ | ||
options, | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
|
||
let | ||
# cfg = config.my.darwin.emacs; | ||
in | ||
{ | ||
# options.my.darwin.emacs = with lib; { | ||
# enable = mkEnableOption "emacs"; | ||
# version = mkOption { | ||
# type = types.str; | ||
# default = "31"; | ||
# }; | ||
# }; | ||
|
||
config = { | ||
homebrew.enable = true; | ||
|
||
homebrew.taps = [ | ||
{ | ||
name = "d12frosted/emacs-plus"; | ||
} | ||
]; | ||
|
||
homebrew.brews = [ | ||
{ | ||
name = "emacs-plus@31"; | ||
args = [ | ||
"verbose" | ||
"with-c9rgreen-sonoma-icon" | ||
# "with-imagemagick" | ||
"with-native-comp" # build with native compilation aka gccemacs | ||
# "with-debug" # build with debug symbols and debugger friendly optimizations | ||
# "with-poll" # build with poll() instead of select() to enable more file descriptors | ||
# "with-xwidgets" # build with native macos webkit support | ||
# "with-no-frame-refocus" # disables frame re-focus (ie. closing one frame does not refocus another one) | ||
]; | ||
} | ||
]; | ||
|
||
environment.systemPackages = [ pkgs.jq ]; | ||
}; | ||
homebrew.enable = true; | ||
homebrew.taps = [ { name = "d12frosted/emacs-plus"; } ]; | ||
homebrew.brews = [ | ||
{ | ||
name = "emacs-plus@31"; | ||
args = [ | ||
"verbose" | ||
"with-c9rgreen-sonoma-icon" | ||
# "with-imagemagick" | ||
"with-native-comp" # build with native compilation aka gccemacs | ||
# "with-debug" # build with debug symbols and debugger friendly optimizations | ||
# "with-poll" # build with poll() instead of select() to enable more file descriptors | ||
# "with-xwidgets" # build with native macos webkit support | ||
# "with-no-frame-refocus" # disables frame re-focus (ie. closing one frame does not refocus another one) | ||
]; | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
|
||
with lib; | ||
|
||
let | ||
emacsdir = "${config.xdg.configHome}/emacs"; | ||
doomdir = "${config.xdg.configHome}/doom"; | ||
in | ||
{ | ||
home.packages = | ||
(with pkgs; [ | ||
binutils # for native-comp | ||
emacs-all-the-icons-fonts | ||
]) | ||
++ (concatLists (attrValues (import ./packages.nix pkgs))); | ||
|
||
home.sessionPath = [ "${emacsdir}/bin" ]; | ||
|
||
home.sessionVariables.EMACSDIR = "${removeSuffix "/" emacsdir}/"; # trailing sep expected | ||
home.sessionVariables.DOOMDIR = "${removeSuffix "/" doomdir}/"; # trailing sep expected | ||
|
||
home.activation = { | ||
setupDoomEmacsConfig = hm.dag.entryAfter [ "writeBoundary" ] '' | ||
if ! [ -d "${emacsdir}" ]; then | ||
run ${pkgs.git}/bin/git clone $VERBOSE_ARG --depth=1 --single-branch "https://github.com/doomemacs/doomemacs.git" "${emacsdir}" | ||
run "${emacsdir}"/bin/doom install | ||
fi | ||
''; | ||
|
||
setupDoomPrivateConfig = hm.dag.entryBefore [ "setupDoomEmacsConfig" ] '' | ||
if ! [ -d "${doomdir}" ]; then | ||
run ${pkgs.git}/bin/git clone $VERBOSE_ARG https://github.com/loganlinn/.doom.d.git "${doomdir}" | ||
fi | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# External requirements for Doom modules. | ||
# These are derived from the "Installation" section from module READMEs. | ||
# See: https://github.com/doomemacs/doomemacs/tree/master/modules | ||
# TODO devise a way for this to be linked with init.el. | ||
pkgs: with pkgs; { | ||
":app irc" = [ gnutls ]; | ||
|
||
":checkers spell +aspell" = [ | ||
(aspellWithDicts ( | ||
ds: with ds; [ | ||
en | ||
en-computers | ||
en-science | ||
] | ||
)) | ||
]; | ||
|
||
":editor format" = [ nodePackages.prettier ]; | ||
|
||
":emacs dired" = [ | ||
fd | ||
ffmpegthumbnailer | ||
gnutar | ||
imagemagick | ||
mediainfo | ||
poppler_utils | ||
unzip | ||
]; | ||
|
||
":emacs undo" = [ zstd ]; | ||
|
||
# ":lang clojure +lsp" = [ clojure-lsp ]; | ||
|
||
# ":lang elixir +lsp" = [ elixir-ls ]; | ||
|
||
# ":lang go +lsp" = [ gopls ]; | ||
|
||
# ":lang java +lsp" = [ java-language-server ]; | ||
|
||
":lang latex" = [ texlive.combined.scheme-medium ]; | ||
|
||
":lang org +gnuplot" = [ gnuplot ]; | ||
|
||
":lang org +pandoc" = [ pandoc ]; | ||
|
||
":lang org +roam" = [ sqlite ]; | ||
|
||
":lang sh +lsp" = [ bash-language-server ]; | ||
|
||
":lang sh" = [ | ||
shellcheck | ||
shfmt | ||
]; | ||
|
||
# ":lang terraform" = [ terraform ]; | ||
|
||
# ":lang zig +lsp" = [ zls ]; | ||
|
||
# ":term vterm" = { | ||
# programs.emacs.extraPackages = epkgs: [ epkgs.vterm ]; | ||
# }; | ||
|
||
":tools direnv" = [ direnv ]; | ||
|
||
":tools editorconfig" = [ editorconfig-core-c ]; | ||
|
||
":tools just" = [ just ]; | ||
|
||
":tools lookup" = [ | ||
ripgrep | ||
sqlite | ||
wordnet | ||
]; | ||
|
||
":tools make" = [ gnumake ]; | ||
|
||
":tools pass" = [ | ||
pass | ||
gnupg | ||
]; | ||
|
||
# ":tools pdf" = [ | ||
# # for building epdfinfo (i.e. M-x pdf-tools-install) | ||
# pkgconfig | ||
# autoconf | ||
# automake | ||
# libpng | ||
# zlib | ||
# poppler | ||
# poppler_gi | ||
# ]; | ||
|
||
# ":lang hugo" = [hugo]; | ||
|
||
# ":lang org +jupyter" = [(python3.withPackages(ps: with ps; [jupyter]))]; | ||
} |
Oops, something went wrong.