diff options
author | Minijackson <minijackson@riseup.net> | 2021-06-16 23:05:17 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2021-06-16 23:05:17 +0200 |
commit | b6e5d6f352cf16da4c07e8fe8dc7611cdcb6e1a2 (patch) | |
tree | df91bb29847cf21477ca6e955c87ec380e625392 /usecases | |
parent | 0d821154aaac085ba23bd602b684001b4c85b4a7 (diff) | |
download | nixos-config-reborn-b6e5d6f352cf16da4c07e8fe8dc7611cdcb6e1a2.tar.gz nixos-config-reborn-b6e5d6f352cf16da4c07e8fe8dc7611cdcb6e1a2.zip |
dev/latex: init
Diffstat (limited to 'usecases')
-rw-r--r-- | usecases/desktop/development.nix | 4 | ||||
-rw-r--r-- | usecases/desktop/development/latex.nix | 110 |
2 files changed, 114 insertions, 0 deletions
diff --git a/usecases/desktop/development.nix b/usecases/desktop/development.nix index fad2596..d4d2a43 100644 --- a/usecases/desktop/development.nix +++ b/usecases/desktop/development.nix | |||
@@ -17,6 +17,10 @@ let | |||
17 | 17 | ||
18 | in | 18 | in |
19 | { | 19 | { |
20 | imports = [ | ||
21 | (import ./development/latex.nix inputs) | ||
22 | ]; | ||
23 | |||
20 | options = with lib; with luaFormat.lib; { | 24 | options = with lib; with luaFormat.lib; { |
21 | vim.lsp = mkOption { | 25 | vim.lsp = mkOption { |
22 | description = '' | 26 | description = '' |
diff --git a/usecases/desktop/development/latex.nix b/usecases/desktop/development/latex.nix new file mode 100644 index 0000000..d9dc80a --- /dev/null +++ b/usecases/desktop/development/latex.nix | |||
@@ -0,0 +1,110 @@ | |||
1 | inputs: | ||
2 | |||
3 | { pkgs, config, ... }: | ||
4 | |||
5 | let | ||
6 | # TODO: add latexmkrc | ||
7 | texliveEnv = with pkgs; texlive.combine { | ||
8 | inherit (texlive) | ||
9 | scheme-small | ||
10 | |||
11 | latexmk | ||
12 | texdoc | ||
13 | # Needed for texdoc but somehow not automatically added | ||
14 | luatex | ||
15 | |||
16 | collection-langenglish | ||
17 | collection-langfrench | ||
18 | csquotes | ||
19 | |||
20 | glossaries | ||
21 | glossaries-english | ||
22 | glossaries-french | ||
23 | glossaries-extra | ||
24 | |||
25 | microtype | ||
26 | fontspec | ||
27 | lm-math | ||
28 | cm-super | ||
29 | a4wide | ||
30 | |||
31 | biber | ||
32 | biblatex | ||
33 | biblatex-ieee | ||
34 | biblatex-apa | ||
35 | |||
36 | nath | ||
37 | stmaryrd | ||
38 | |||
39 | placeins | ||
40 | wrapfig | ||
41 | |||
42 | algorithms | ||
43 | algorithmicx | ||
44 | |||
45 | # For Metropolis Beamer theme | ||
46 | catchfile | ||
47 | |||
48 | minted | ||
49 | |||
50 | asymptote | ||
51 | |||
52 | todonotes | ||
53 | |||
54 | standalone | ||
55 | |||
56 | dirtree | ||
57 | |||
58 | cleveref | ||
59 | xurl | ||
60 | # For varioref | ||
61 | tools | ||
62 | |||
63 | footmisc | ||
64 | |||
65 | morewrites | ||
66 | |||
67 | # For Metropolis Beamer theme | ||
68 | pgfopts | ||
69 | |||
70 | beamertheme-metropolis | ||
71 | beamercolorthemeowl | ||
72 | |||
73 | # Dependencies somehow missing | ||
74 | logreq xstring fvextra ifplatform framed | ||
75 | # For standalone | ||
76 | currfile | ||
77 | # For glossaries | ||
78 | xindy mfirstuc xfor datatool tracklang | ||
79 | # For datatool | ||
80 | substr | ||
81 | # For asymptote | ||
82 | everypage media9 ocgx2 | ||
83 | ; | ||
84 | }; | ||
85 | in | ||
86 | { | ||
87 | |||
88 | users.extraUsers.minijackson.packages = with pkgs; [ | ||
89 | texliveEnv | ||
90 | biber | ||
91 | #tomorrowPygments | ||
92 | asymptote | ||
93 | ghostscript | ||
94 | xdotool | ||
95 | ]; | ||
96 | |||
97 | # Fira Code is nice for code reading | ||
98 | fonts.fonts = with pkgs; [ fira-code cm_unicode ]; | ||
99 | |||
100 | vim = { | ||
101 | lsp.texlab = { | ||
102 | cmd = [ "${pkgs.unstable.texlab}/bin/texlab" ]; | ||
103 | settings.texlab.build = { | ||
104 | executable = "${texliveEnv}/bin/latexmk"; | ||
105 | args = [ "-synctex=1" "-interaction=nonstopmode" "-shell-escape" "-use-make" "-8bit" "-xelatex" "-output-directory=latexmk-build" "%f" ]; | ||
106 | auxDirectory = [ "latexmk-build" ]; | ||
107 | }; | ||
108 | }; | ||
109 | }; | ||
110 | } | ||