diff options
author | Adrian Kummerlaender | 2020-06-10 00:05:16 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2020-06-10 00:05:16 +0200 |
commit | 3d262f89e04a76a78667a4fc692ae71e540b7566 (patch) | |
tree | beeab8954cda0ed37164dca1744d816ff15b1ece /gui/emacs.nix | |
parent | 61fd89e65e40a253ff95cfe41696a7ae5836d38a (diff) | |
download | nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar.gz nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar.bz2 nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar.lz nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar.xz nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.tar.zst nixos_home-3d262f89e04a76a78667a4fc692ae71e540b7566.zip |
Enable inline LaTeX previews in Orgmode
Diffstat (limited to 'gui/emacs.nix')
-rw-r--r-- | gui/emacs.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gui/emacs.nix b/gui/emacs.nix index 57fac2a..008f6a7 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -14,6 +14,28 @@ mv akr-theme.el $out/share/emacs/site-lisp/ ''; }; + + custom-runtime-env-el = let + tex = pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-small dvipng; + }; + in pkgs.writeTextFile { + name = "custom-runtime-env.el"; + text = '' + (setenv "PATH" (concat (getenv "PATH") ":${tex}/bin")) + (add-to-list 'exec-path "${tex}/bin") + ''; + }; + + custom-runtime-env = pkgs.stdenv.mkDerivation { + name = "emacs-custom-runtime-env"; + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/share/emacs/site-lisp + cp ${custom-runtime-env-el} $out/share/emacs/site-lisp/custom-runtime-env.el + ''; + }; in { enable = true; @@ -21,6 +43,7 @@ pdf-tools ] ++ [ akr-color-theme + custom-runtime-env ]; }; |