aboutsummaryrefslogtreecommitdiffstats
path: root/modules/office/zathura/default.nix
blob: f17a5c3dbc376a387b8698d64c9874cacfbbf11a (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
{
  config,
  lib,
  pkgs,
  ...
}:

# Zathura - Minimalistic document viewer (PDF, DJVU, etc.)
{
  options.office.zathura = {
    enable = lib.mkEnableOption "Enables zathura.";
  };

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

    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";
    };
  };
}