blob: db742ec73336215cf4f15b08b92712b94808d68f (
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
|
# Minimalistic document viewer
{
config,
lib,
...
}:
{
options.office.zathura = {
enable = lib.mkEnableOption "Enables zathura.";
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
default = config.programs.zathura.package;
description = "The zathura package to use.";
};
};
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";
};
};
}
|