nixos/home/emacs/default.nix

176 lines
4 KiB
Nix
Raw Normal View History

2024-01-30 14:21:50 +00:00
{
config,
pkgs,
fonts,
2024-01-30 14:21:50 +00:00
...
}: {
imports = [../git/default.nix ../prog/default.nix];
programs.git.extraConfig.core.editor = "$EDITOR";
programs.emacs = {
# Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs
enable = true;
package = pkgs.emacs29-pgtk;
extraConfig = let
shell = "${pkgs.zsh}/bin/zsh";
font = "${fonts.monospace.name}-${toString fonts.sizes.applications}";
fixed-font-family = "${fonts.monospace.name}";
variable-font-family = "${fonts.sansSerif.name}";
alpha = "80";
in ''
(customize-set-variable 'shell-file-name "${shell}")
(add-to-list 'initial-frame-alist '(font . "${font}"))
(add-to-list 'default-frame-alist '(font . "${font}"))
(set-face-attribute 'fixed-pitch nil :family "${fixed-font-family}")
(set-face-attribute 'fixed-pitch-serif nil :family "${fixed-font-family}")
(set-face-attribute 'variable-pitch nil :family "${variable-font-family}")
(add-to-list 'initial-frame-alist '(alpha-background . ${alpha}))
(add-to-list 'default-frame-alist '(alpha-background . ${alpha}))
(scroll-bar-mode -1)
(tab-bar-mode -1)
2024-02-21 07:25:40 +00:00
(menu-bar-mode -1)
'';
extraPackages = epkgs:
with epkgs; [
2024-04-17 13:34:58 +01:00
# Theme
catppuccin-theme
2024-04-17 13:34:58 +01:00
# UI
all-the-icons
nerd-icons
nerd-icons-completion
nerd-icons-corfu
nerd-icons-dired
nerd-icons-ibuffer
doom-modeline
diminish
ligature
page-break-lines
helpful
which-key
link-hint
diff-hl
2023-12-19 14:46:57 +00:00
2024-04-17 13:34:58 +01:00
# Completion
cape
consult
consult-eglot
2024-04-17 13:34:58 +01:00
consult-flyspell
corfu
corfu-terminal
embark
embark-consult
marginalia
orderless
vertico
2024-04-17 13:34:58 +01:00
# Snippets
2024-02-21 06:41:28 +00:00
tempel
tempel-collection
2024-04-17 13:34:58 +01:00
# spell-checking
flyspell-correct
# password-store
pass
password-store
password-store-otp
# IDE
treesit-grammars.with-all-grammars
treesit-auto
2024-04-17 13:34:58 +01:00
nushell-ts-mode
2024-01-10 10:31:38 +00:00
flymake-popon
2024-02-16 17:12:07 +00:00
flymake-collection
2024-03-18 21:09:37 +00:00
flymake-lua
flymake-ruff
2024-02-16 17:12:07 +00:00
flymake-clippy
flymake-eslint
flymake-shellcheck
apheleia
direnv
rainbow-delimiters
aggressive-indent
nix-mode
lua-mode
cargo
2024-04-17 13:34:58 +01:00
# Media
emms
2024-04-17 13:34:58 +01:00
# org-mode
org-roam
org-noter
org-journal
2024-04-17 13:34:58 +01:00
# org-cite
citar
citar-embark
2024-04-17 13:34:58 +01:00
# org-plot
2024-01-04 11:03:24 +00:00
gnuplot
2024-04-17 13:34:58 +01:00
# Projects
2023-11-16 12:50:37 +00:00
ibuffer-project
magit
forge
2024-04-17 13:34:58 +01:00
# Writing
markdown-mode
pandoc-mode
auctex
auctex-latexmk
latex-preview-pane
2024-04-17 13:34:58 +01:00
# Email
mu4e
2024-04-17 13:34:58 +01:00
# RSS/YouTube feeds
elfeed
elfeed-org
elfeed-tube
elfeed-tube-mpv
];
};
services = {
emacs = {
enable = true;
package = config.programs.emacs.finalPackage;
defaultEditor = true;
client.enable = true;
socketActivation.enable = false;
startWithUserSession = true;
2024-02-10 06:45:31 +00:00
};
git-sync.repositories = with config.xdg.userDirs; {
org = {
path = "${documents}/Org";
uri = "git+https://git.xenia.me.uk/xenia/org.git";
};
references = {
path = "${documents}/References";
uri = "git+https://git.xenia.me.uk/xenia/references.git";
};
2024-02-10 06:45:31 +00:00
};
};
home.packages = with pkgs; [
# Emacs requirements
imagemagick
languagetool
wordnet
gnuplot # For org-plot
graphviz # For org-roam graph
mp3info # For EMMS
# Language-specific requirements
sqlite
pandoc
ghostscript
poppler_utils
# Customised LaTeX install
(texlive.combine {
inherit (pkgs.texlive) scheme-medium dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;
})
];
}