summaryrefslogtreecommitdiff
path: root/modules/emacs.nix
diff options
context:
space:
mode:
authorGrisha Shipunov2025-08-15 18:34:37 +0200
committerGrisha Shipunov2025-08-15 18:35:18 +0200
commitf35599a59a080f0e7a173e21cae3d51dc230a212 (patch)
tree1b1b9f91f754b24602d6649df80d002cbb6d11f2 /modules/emacs.nix
parent963dbeb3685326d1420aadd6345db1902e8fc1f2 (diff)
Revert "retire toaster"
This reverts commit 1baa256be04a8b4e711a7d48a76197b5ffad6637.
Diffstat (limited to 'modules/emacs.nix')
-rw-r--r--modules/emacs.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/modules/emacs.nix b/modules/emacs.nix
new file mode 100644
index 0000000..39c2db8
--- /dev/null
+++ b/modules/emacs.nix
@@ -0,0 +1,60 @@
+{
+ pkgs,
+ lib,
+ ...
+}:
+
+{
+ environment.systemPackages =
+ let
+ # https://wiki.nixos.org/wiki/TexLive
+ # minimal set of latex packages for orgmode
+ # emacs config:
+ # (setq org-latex-complier "lualatex")
+ # (setq org-preview-latex-default-process 'dvisvgm)
+ orgmode-tex = (
+ pkgs.texlive.combine {
+ inherit (pkgs.texlive)
+ scheme-basic
+ dvisvgm
+ dvipng
+ wrapfig
+ amsmath
+ ulem
+ hyperref
+ capt-of
+ ;
+ }
+ );
+ in
+ with pkgs;
+ [
+ mu
+ orgmode-tex
+ ];
+
+ services.emacs = {
+ install = true;
+ enable = true;
+ package =
+ with pkgs;
+ (
+ (emacsPackagesFor (
+ emacs-pgtk.overrideAttrs (old: {
+ passthru = old.passthru // {
+ treeSitter = true;
+ };
+ })
+ )).emacsWithPackages
+ (
+ epkgs: with epkgs; [
+ treesit-grammars.with-all-grammars
+ vterm
+ pdf-tools
+ mu4e
+ ]
+ )
+ );
+ defaultEditor = lib.mkForce true;
+ };
+}