diff --git a/nix/configuration/configuration.nix b/nix/configuration/configuration.nix index 430e237..67e3a45 100644 --- a/nix/configuration/configuration.nix +++ b/nix/configuration/configuration.nix @@ -46,6 +46,7 @@ ./roles/rust ./roles/media ./roles/steam + ./roles/latex ]; nix.settings.experimental-features = [ diff --git a/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el b/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el index 4a9166d..59562ee 100644 --- a/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el +++ b/nix/configuration/roles/emacs/files/emacs/elisp/lang-org.el @@ -38,6 +38,8 @@ ;; TODO: There is an option to set the compiler, could be better than manually doing this here https://orgmode.org/manual/LaTeX_002fPDF-export-commands.html ;; (setq org-latex-compiler "lualatex") + ;; TODO: nixos latex page recommends this line, figure out what it does / why its needed: + ;; (setq org-preview-latex-default-process 'dvisvgm) (setq org-latex-pdf-process '("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" diff --git a/nix/configuration/roles/latex/default.nix b/nix/configuration/roles/latex/default.nix new file mode 100644 index 0000000..d261b78 --- /dev/null +++ b/nix/configuration/roles/latex/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: +let + tex = ( + pkgs.texlive.combine { + inherit (pkgs.texlive) + scheme-basic + dvisvgm + dvipng # for preview and export as html in org-mode + wrapfig + amsmath + ulem + hyperref + capt-of + ; + } + ); +in +{ + imports = [ ]; + + environment.systemPackages = with pkgs; [ + tex + ]; + +}