emacs/module.nix: move to nix-doom-emacs-unstraightened
This commit is contained in:
parent
65fa47449b
commit
8627f2fa63
3 changed files with 237 additions and 0 deletions
|
@ -59,6 +59,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
|
nix-doom-emacs-unstraightened = {
|
||||||
|
url = "github:marienz/nix-doom-emacs-unstraightened";
|
||||||
|
inputs.nixpkgs.follows = "";
|
||||||
|
};
|
||||||
|
|
||||||
# I use schizofox as my personal browser. This is because I am schizophrenic.
|
# I use schizofox as my personal browser. This is because I am schizophrenic.
|
||||||
schizofox = {
|
schizofox = {
|
||||||
|
|
93
modules/programs/editors/emacs/module.nix
Normal file
93
modules/programs/editors/emacs/module.nix
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.modules.system.programs.editors.emacs;
|
||||||
|
inherit (config.modules.other.system) username;
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
# Taken from outfoxxed since figuring this out is really annoying.
|
||||||
|
pkgswithemacs =
|
||||||
|
pkgs.appendOverlays
|
||||||
|
(with inputs.emacs-overlay.overlays; [
|
||||||
|
emacs
|
||||||
|
package
|
||||||
|
]);
|
||||||
|
|
||||||
|
custom-emacs = with pkgswithemacs; ((emacsPackagesFor
|
||||||
|
(emacs29-pgtk.override {
|
||||||
|
withNativeCompilation = true;
|
||||||
|
withSQLite3 = true;
|
||||||
|
withTreeSitter = true;
|
||||||
|
withToolkitScrollBars = false;
|
||||||
|
toolkit = "no";
|
||||||
|
}))
|
||||||
|
.emacsWithPackages (epkgs:
|
||||||
|
with epkgs; [
|
||||||
|
treesit-grammars.with-all-grammars
|
||||||
|
vterm
|
||||||
|
]));
|
||||||
|
in {
|
||||||
|
imports = [inputs.nix-doom-emacs-unstraightened.hmModule];
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
programs.doom-emacs = {
|
||||||
|
enable = true;
|
||||||
|
doomDir = ~/.config/doom;
|
||||||
|
emacs = custom-emacs;
|
||||||
|
extraBinPackages = with pkgs; [git python3 pinentry-tty];
|
||||||
|
extraPackages = epkgs:
|
||||||
|
with epkgs; [
|
||||||
|
vterm
|
||||||
|
treesit-grammars.with-all-grammars
|
||||||
|
eat
|
||||||
|
eshell-prompt-extras
|
||||||
|
esh-autosuggest
|
||||||
|
fish-completion
|
||||||
|
esh-help
|
||||||
|
eshell-syntax-highlighting
|
||||||
|
pinentry
|
||||||
|
];
|
||||||
|
provideEmacs = false;
|
||||||
|
experimentalFetchTree = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# needed my native-comp
|
||||||
|
binutils
|
||||||
|
# Emacs itself
|
||||||
|
custom-emacs
|
||||||
|
|
||||||
|
# Doom dependencies
|
||||||
|
git
|
||||||
|
ripgrep
|
||||||
|
gnutls
|
||||||
|
|
||||||
|
## Optional dependencies
|
||||||
|
fd # faster projectile indexing
|
||||||
|
imagemagick # for image-dired
|
||||||
|
# (mkIf (config.programs.gnupg.agent.enable)
|
||||||
|
# pinentry-emacs) # in-emacs gnupg prompts
|
||||||
|
zstd # for undo-fu-session/undo-tree compression
|
||||||
|
nodePackages.prettier
|
||||||
|
# Module dependencies
|
||||||
|
# :checkers spell
|
||||||
|
(aspellWithDicts (ds: with ds; [de en en-computers en-science]))
|
||||||
|
# :tools editorconfig
|
||||||
|
editorconfig-core-c # per-project style config
|
||||||
|
# :tools lookup & :lang org +roam
|
||||||
|
sqlite
|
||||||
|
# :lang latex & :lang org (latex previews)
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
# :lang beancount
|
||||||
|
# beancount
|
||||||
|
# fava
|
||||||
|
# :lang nix
|
||||||
|
age
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
140
modules/programs/editors/emacs/module2.nix
Normal file
140
modules/programs/editors/emacs/module2.nix
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.modules.system.programs.editors.emacs;
|
||||||
|
inherit (config.modules.other.system) username;
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
# Taken from outfoxxed since figuring this out is really annoying.
|
||||||
|
pkgswithemacs =
|
||||||
|
pkgs.appendOverlays
|
||||||
|
(with inputs.emacs-overlay.overlays; [
|
||||||
|
emacs
|
||||||
|
package
|
||||||
|
]);
|
||||||
|
|
||||||
|
custom-emacs = with pkgswithemacs; ((emacsPackagesFor
|
||||||
|
(emacs29-pgtk.override {withNativeCompilation = true;}))
|
||||||
|
.emacsWithPackages (epkgs:
|
||||||
|
with epkgs; [
|
||||||
|
# alert
|
||||||
|
# all-the-icons
|
||||||
|
# all-the-icons-dired
|
||||||
|
# avy
|
||||||
|
# beacon
|
||||||
|
# catppuccin-theme
|
||||||
|
# cask-mode
|
||||||
|
# company
|
||||||
|
# crux
|
||||||
|
# dimmer
|
||||||
|
# dired-du
|
||||||
|
# dired-open
|
||||||
|
# direnv
|
||||||
|
# dirvish
|
||||||
|
# doom-modeline
|
||||||
|
# editorconfig
|
||||||
|
# emacs-all-the-icons-fonts
|
||||||
|
# evil
|
||||||
|
# evil-collection
|
||||||
|
# evil-commentary
|
||||||
|
# evil-goggles
|
||||||
|
# flycheck
|
||||||
|
# flycheck-relint
|
||||||
|
# flymake
|
||||||
|
# form-feed
|
||||||
|
# general
|
||||||
|
# hl-todo
|
||||||
|
# ligature
|
||||||
|
# lsp-mode
|
||||||
|
# lsp-treemacs
|
||||||
|
# lsp-ui
|
||||||
|
# macrostep
|
||||||
|
# magit
|
||||||
|
# markdown-mode
|
||||||
|
# modus-themes
|
||||||
|
# move-text
|
||||||
|
# org-cliplink
|
||||||
|
org-contacts
|
||||||
|
# org-pomodoro
|
||||||
|
# nano-theme
|
||||||
|
# no-littering
|
||||||
|
# nov
|
||||||
|
# paredit
|
||||||
|
# peep-dired
|
||||||
|
# projectile
|
||||||
|
# rainbow-delimiters
|
||||||
|
# rainbow-mode
|
||||||
|
# relint
|
||||||
|
# ripgrep
|
||||||
|
# smartparens
|
||||||
|
# string-inflection
|
||||||
|
# svg-lib
|
||||||
|
# tldr
|
||||||
|
# toc-org
|
||||||
|
treesit-grammars.with-all-grammars
|
||||||
|
# treemacs
|
||||||
|
# treemacs-evil
|
||||||
|
# treemacs-projectile
|
||||||
|
# treemacs-magit
|
||||||
|
# tree-sitter
|
||||||
|
# undo-tree
|
||||||
|
# use-package
|
||||||
|
# vertico
|
||||||
|
# vertico-posframe
|
||||||
|
vterm
|
||||||
|
# vterm-toggle
|
||||||
|
# which-key
|
||||||
|
# whitespace-cleanup-mode
|
||||||
|
# wakatime-mode
|
||||||
|
# ws-butler
|
||||||
|
]));
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.variables.PATH = ["$XDG_CONFIG_HOME/emacs/bin"];
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# needed my native-comp
|
||||||
|
binutils
|
||||||
|
# Emacs itself
|
||||||
|
custom-emacs
|
||||||
|
|
||||||
|
# Doom dependencies
|
||||||
|
git
|
||||||
|
ripgrep
|
||||||
|
gnutls
|
||||||
|
|
||||||
|
clang-tools
|
||||||
|
## Optional dependencies
|
||||||
|
fd # faster projectile indexing
|
||||||
|
imagemagick # for image-dired
|
||||||
|
# (mkIf (config.programs.gnupg.agent.enable)
|
||||||
|
# pinentry-emacs) # in-emacs gnupg prompts
|
||||||
|
zstd # for undo-fu-session/undo-tree compression
|
||||||
|
nodePackages.prettier
|
||||||
|
# Module dependencies
|
||||||
|
# :checkers spell
|
||||||
|
(aspellWithDicts (ds: with ds; [de en en-computers en-science]))
|
||||||
|
# :tools editorconfig
|
||||||
|
editorconfig-core-c # per-project style config
|
||||||
|
# :tools lookup & :lang org +roam
|
||||||
|
sqlite
|
||||||
|
# :lang latex & :lang org (latex previews)
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
# :lang beancount
|
||||||
|
# beancount
|
||||||
|
# fava
|
||||||
|
# :lang nix
|
||||||
|
age
|
||||||
|
];
|
||||||
|
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = custom-emacs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue