This repository has been archived on 2024-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager/programs/emacs/default.nix

178 lines
3.7 KiB
Nix
Raw Normal View History

{
config,
pkgs,
fonts,
...
}: {
imports = [
../shell/default.nix
./python/default.nix
./lua/default.nix
];
services.emacs = {
enable = true;
package = config.programs.emacs.finalPackage;
defaultEditor = true;
client.enable = true;
2024-06-13 07:12:47 +01:00
socketActivation.enable = true;
startWithUserSession = false;
};
programs.emacs = {
# Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.emacs.d
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}";
Squashed commit of the following: commit 68df6945a226870a9911497684dc17ab1c6bee5f Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Mon Jun 17 08:44:52 2024 +0100 Remove gnome-themes-extra and adwaita-qt commit fa7baa7812884fb4f33880193a3facf0ab86ad1d Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Mon Jun 17 08:37:45 2024 +0100 Export more rc2 settings for Vanguard commit 4a101ee77d6b7bdc71fb575f021cb15dd3f25405 Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Mon Jun 17 08:27:46 2024 +0100 Set pinentry package to Qt variant when using plasma6 Add extra theme/icon packages to installed packages whilst configuring commit 923adabb2838548c97fed67945536defb038edb7 Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Mon Jun 17 08:23:48 2024 +0100 Add rc2 export for Vanguard as well Remove some sway config from Vanguard.nix Remove home-manager kdeconnect service, incompatible with system/plasma6 enabled service Install pinentry-all by default to ensure compatibility commit dfc1ac3f743cb759c774fe893093a5a20e1f3aed Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Mon Jun 17 07:35:31 2024 +0100 Add plasma6 export using rc2nix commit eb8bb86c17bf77f0fa1cc2dea35e360eaa0374c0 Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Sun Jun 16 20:44:38 2024 +0100 Disable/remove more options not needed for plasma6 commit 51171ddb06767a2669b1a6f13f2f8753424c18f1 Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Sun Jun 16 19:31:15 2024 +0100 Re-enable alacritty decorations, disable translucency for alacritty and emacs commit 99364c041b2c3d6ba9fa5dba82a2427818a8d65e Author: Evie Litherland-Smith <evie@xenia.me.uk> Date: Sun Jun 16 12:42:26 2024 +0100 Disable sway and related modules
2024-06-17 08:47:53 +01:00
alpha = "100"; # "90";
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}))
'';
extraPackages = epkgs:
with epkgs; [
# Theme
base16-theme
# UI
all-the-icons
nerd-icons
nerd-icons-completion
nerd-icons-corfu
nerd-icons-dired
nerd-icons-ibuffer
diminish
ligature
page-break-lines
helpful
which-key
2024-05-22 10:11:33 +01:00
ace-window
link-hint
diff-hl
# Completion
cape
consult
consult-eglot
consult-flyspell
corfu
corfu-terminal
embark
embark-consult
marginalia
orderless
vertico
# Templates
tempel
license-templates
gitignore-templates
# spell-checking
flyspell-correct
# password-store
pass
password-store
# IDE
treesit-grammars.with-all-grammars
treesit-auto
flymake-popon
flymake-shellcheck
flymake-yamllint
apheleia
envrc
rainbow-delimiters
aggressive-indent
python-docstring
2024-05-16 10:39:45 +01:00
nix-mode
lua-mode
# Media
emms
# org-mode
org-roam
org-noter
org-journal
# org-cite
citar
citar-embark
# org-mode HTML export
htmlize
# Projects
ibuffer-project
magit
forge
2024-06-04 17:26:37 +01:00
treemacs
treemacs-nerd-icons
# Writing
markdown-mode
pandoc-mode
auctex
auctex-latexmk
latex-preview-pane
2024-06-12 07:31:52 +01:00
# Contacts
bbdb
mu4e
2024-06-12 07:31:52 +01:00
ement
# RSS feeds
elfeed
elfeed-org
elfeed-tube
];
};
home.packages = with pkgs; [
# Emacs requirements
imagemagick
languagetool
wordnet
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;})
python3Packages.pygments
# Development tools
## Linters
shellcheck
yamllint
## Formatters
alejandra
shfmt
2024-05-15 11:59:24 +01:00
ruff
isort
stylua
nodePackages.prettier
## Language servers
pyright
lua-language-server
];
}