2024-01-30 14:21:50 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-02-06 06:43:01 +00:00
|
|
|
imports = [../git/default.nix];
|
|
|
|
programs.git.extraConfig.core.editor = "${config.programs.emacs.finalPackage}/bin/emacsclient -c";
|
2023-11-05 05:55:52 +00:00
|
|
|
programs.emacs = {
|
2023-12-11 12:11:55 +00:00
|
|
|
# Clone emacs config from https://git.xenia.me.uk/xenia/emacs.git
|
2023-11-05 05:55:52 +00:00
|
|
|
enable = true;
|
|
|
|
package = pkgs.emacs29-pgtk;
|
2024-02-02 10:47:42 +00:00
|
|
|
extraConfig = with builtins;
|
|
|
|
with config; let
|
|
|
|
font = "${stylix.fonts.monospace.name}-${toString stylix.fonts.sizes.applications}";
|
|
|
|
alpha = "${toString (floor (mul stylix.opacity.applications 100))}";
|
|
|
|
in ''
|
|
|
|
(org-babel-load-file "~/.emacs/README.org")
|
2024-02-05 11:57:30 +00:00
|
|
|
(customize-set-variable 'shell-file-name "/bin/sh")
|
2024-02-02 10:47:42 +00:00
|
|
|
(add-to-list 'initial-frame-alist '(font . "${font}"))
|
|
|
|
(add-to-list 'default-frame-alist '(font . "${font}"))
|
|
|
|
(add-to-list 'initial-frame-alist '(alpha-background . ${alpha}))
|
|
|
|
(add-to-list 'default-frame-alist '(alpha-background . ${alpha}))
|
2024-02-03 06:03:22 +00:00
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(tab-bar-mode -1)
|
2024-02-02 10:47:42 +00:00
|
|
|
'';
|
2023-11-05 05:55:52 +00:00
|
|
|
extraPackages = epkgs:
|
|
|
|
with epkgs; [
|
2023-11-14 07:29:36 +00:00
|
|
|
# theme
|
2024-01-09 15:48:11 +00:00
|
|
|
modus-themes
|
2023-11-08 06:27:32 +00:00
|
|
|
|
2024-01-10 15:40:37 +00:00
|
|
|
# spell-checking
|
|
|
|
flyspell-correct
|
|
|
|
consult-flyspell
|
|
|
|
|
2023-12-19 14:46:57 +00:00
|
|
|
# password-store
|
|
|
|
password-store
|
|
|
|
password-store-otp
|
|
|
|
pass # password-store major mode
|
|
|
|
|
2023-11-05 05:55:52 +00:00
|
|
|
# completion-packages
|
|
|
|
cape
|
|
|
|
consult
|
2023-12-21 12:18:38 +00:00
|
|
|
consult-eglot
|
|
|
|
consult-yasnippet
|
2023-11-05 05:55:52 +00:00
|
|
|
corfu
|
|
|
|
corfu-terminal
|
|
|
|
embark
|
|
|
|
embark-consult
|
|
|
|
marginalia
|
|
|
|
orderless
|
|
|
|
vertico
|
|
|
|
|
2023-11-14 07:29:36 +00:00
|
|
|
# snippets-packages
|
2023-12-21 12:18:38 +00:00
|
|
|
yasnippet
|
|
|
|
yasnippet-snippets
|
|
|
|
yasnippet-capf
|
2023-11-14 07:29:36 +00:00
|
|
|
|
2023-11-05 05:55:52 +00:00
|
|
|
# ide-packages
|
|
|
|
treesit-grammars.with-all-grammars
|
|
|
|
treesit-auto
|
2024-01-10 10:31:38 +00:00
|
|
|
flymake-popon
|
2024-01-28 10:02:44 +00:00
|
|
|
flymake-shellcheck
|
2023-11-05 05:55:52 +00:00
|
|
|
apheleia
|
|
|
|
direnv
|
|
|
|
rainbow-delimiters
|
2023-11-17 14:48:04 +00:00
|
|
|
aggressive-indent
|
2023-11-05 05:55:52 +00:00
|
|
|
nix-mode
|
2023-11-09 07:09:48 +00:00
|
|
|
lua-mode
|
2023-12-31 09:23:56 +00:00
|
|
|
cargo
|
2023-11-05 05:55:52 +00:00
|
|
|
|
|
|
|
# media-packages
|
|
|
|
emms
|
|
|
|
|
|
|
|
# org-packages
|
2024-01-29 08:28:31 +00:00
|
|
|
org-roam
|
2023-12-20 10:59:56 +00:00
|
|
|
org-alert
|
2023-11-09 07:09:48 +00:00
|
|
|
org-noter
|
2023-11-05 05:55:52 +00:00
|
|
|
org-journal
|
|
|
|
citar
|
|
|
|
citar-embark
|
2024-01-04 11:03:24 +00:00
|
|
|
gnuplot
|
2023-11-05 05:55:52 +00:00
|
|
|
|
|
|
|
# project-packages
|
2023-11-16 12:50:37 +00:00
|
|
|
ibuffer-project
|
2023-11-05 05:55:52 +00:00
|
|
|
magit
|
2023-11-09 07:09:48 +00:00
|
|
|
forge
|
2023-11-05 05:55:52 +00:00
|
|
|
|
|
|
|
# ui-packages
|
|
|
|
all-the-icons
|
|
|
|
nerd-icons
|
|
|
|
nerd-icons-completion
|
2023-12-21 12:18:38 +00:00
|
|
|
nerd-icons-corfu
|
2023-11-05 05:55:52 +00:00
|
|
|
nerd-icons-dired
|
|
|
|
nerd-icons-ibuffer
|
2024-01-09 09:02:48 +00:00
|
|
|
diminish
|
2023-11-07 07:06:30 +00:00
|
|
|
ligature
|
2023-11-05 05:55:52 +00:00
|
|
|
page-break-lines
|
|
|
|
helpful
|
|
|
|
which-key
|
|
|
|
link-hint
|
2023-12-08 15:15:21 +00:00
|
|
|
diff-hl
|
2023-11-05 05:55:52 +00:00
|
|
|
|
2024-02-03 08:10:23 +00:00
|
|
|
# Tree-Sitter packages
|
|
|
|
nushell-ts-mode
|
|
|
|
|
2023-11-05 05:55:52 +00:00
|
|
|
# writing-packages
|
|
|
|
markdown-mode
|
|
|
|
pandoc-mode
|
|
|
|
auctex
|
|
|
|
auctex-latexmk
|
2023-11-09 07:09:48 +00:00
|
|
|
latex-preview-pane
|
2023-11-05 05:55:52 +00:00
|
|
|
|
|
|
|
# email-packages
|
|
|
|
mu4e
|
|
|
|
|
|
|
|
# feed-packages
|
|
|
|
elfeed
|
|
|
|
elfeed-org
|
|
|
|
elfeed-tube
|
|
|
|
elfeed-tube-mpv
|
|
|
|
];
|
|
|
|
};
|
2024-01-29 08:21:26 +00:00
|
|
|
services.emacs = {
|
|
|
|
enable = true;
|
|
|
|
package = config.programs.emacs.finalPackage;
|
|
|
|
startWithUserSession = false;
|
|
|
|
defaultEditor = true;
|
|
|
|
client.enable = true;
|
|
|
|
socketActivation.enable = true;
|
|
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
# Emacs requirements
|
|
|
|
fd
|
|
|
|
ripgrep
|
|
|
|
imagemagick
|
|
|
|
languagetool
|
|
|
|
wordnet
|
2024-01-30 14:21:50 +00:00
|
|
|
(aspellWithDicts (ds: with ds; [en en-computers en-science]))
|
2024-01-29 08:21:26 +00:00
|
|
|
|
|
|
|
# For org-plot
|
|
|
|
gnuplot
|
|
|
|
|
|
|
|
# For EMMS
|
|
|
|
mp3info
|
|
|
|
|
|
|
|
# Language-specific requirements
|
|
|
|
sqlite
|
|
|
|
pandoc
|
|
|
|
ghostscript
|
|
|
|
mupdf
|
|
|
|
poppler_utils
|
|
|
|
|
|
|
|
# Customised LaTeX install
|
|
|
|
# texlive.combined.scheme-full
|
|
|
|
(texlive.combine {
|
2024-01-30 14:21:50 +00:00
|
|
|
inherit
|
|
|
|
(pkgs.texlive)
|
|
|
|
scheme-basic
|
|
|
|
dvisvgm
|
|
|
|
dvipng
|
|
|
|
wrapfig
|
|
|
|
amsmath
|
|
|
|
ulem
|
|
|
|
hyperref
|
|
|
|
capt-of
|
2024-01-31 18:27:57 +00:00
|
|
|
beamer
|
2024-01-30 14:21:50 +00:00
|
|
|
;
|
2024-01-29 08:21:26 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
# Linters
|
|
|
|
shellcheck
|
|
|
|
|
|
|
|
# Formatters
|
|
|
|
nodePackages.prettier
|
2024-01-30 13:53:38 +00:00
|
|
|
alejandra
|
2024-01-29 08:21:26 +00:00
|
|
|
ruff
|
|
|
|
isort
|
|
|
|
fprettify
|
|
|
|
rustfmt
|
|
|
|
stylua
|
|
|
|
shfmt
|
|
|
|
|
|
|
|
# LSP Servers
|
|
|
|
nil
|
|
|
|
fortls
|
|
|
|
rust-analyzer
|
|
|
|
luajitPackages.lua-lsp
|
|
|
|
python3Packages.jedi-language-server
|
|
|
|
];
|
2023-07-26 15:45:24 +01:00
|
|
|
}
|