aboutsummaryrefslogtreecommitdiff
path: root/modules/home/productivity/latex/default.nix
blob: 6f37138c54a3db00abbe4562ff9e58816988cb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  config,
  options,
  pkgs,
  lib,
  ...
}:
let
  cfg = config.nx.productivity.latex;
  inherit (lib) mkEnableOption mkIf;
in
{
  options.nx.productivity.latex = {
    enable = mkEnableOption "LaTeX typesetting system";
  };

  config = mkIf cfg.enable {
    programs.texlive = {
      enable = true;
      # See https://mynixos.com/search?q=texlivepackages.collection for more collections
      # and https://mynixos.com/search?q=texlivepackages for more individual packages.
      extraPackages = tpkgs: {
        inherit (tpkgs)
          collection-basic
          collection-latex
          collection-latexrecommended
          biblatex
          ;
      };
    };

    home.packages = with pkgs; [
      biber
    ];

    programs.pandoc = {
      enable = true;
      defaults = {
        pdf-engine = "pdfetex";
      };
    };
  };
}