aboutsummaryrefslogtreecommitdiff
path: root/modules/programs/latex.nix
blob: 5a9f8b41b078836ba5e2e72ff16b68b3c44b438f (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
{
  config,
  username,
  pkgs,
  lib,
  ...
}:

{
  options.nx.programs.latex.enable = lib.mkEnableOption "Setup latex";
  config = lib.mkIf config.nx.programs.latex.enable {
    home-manager.users.${username} = {
      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";
        };
      };
    };
  };
}