aboutsummaryrefslogtreecommitdiffstats
path: root/modules/office/zathura/default.nix
blob: 69dbfcffd743c664410b0474ed45cc1bdb851c8a (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
# Zathura - Minimalistic document viewer (PDF, DJVU, etc.)
{
  config,
  lib,
  ...
}:
{
  options.office.zathura = {
    enable = lib.mkEnableOption "Enables zathura.";
  };

  config = lib.mkIf config.office.zathura.enable {
    programs.zathura = {
      enable = true;
    };

    xdg.mimeApps.defaultApplications = {
      "application/pdf" = "zathura.desktop";
      "application/x-pdf" = "zathura.desktop";
      "image/vnd.djvu" = "zathura.desktop";
      "application/epub+zip" = "zathura.desktop";
      "application/postscript" = "zathura.desktop";
      "application/vnd.comicbook+zip" = "zathura.desktop";
      "application/vnd.comicbook-rar" = "zathura.desktop";
    };
  };
}