neovim-flake/modules/plugins/languages/tex/pdfViewer/okular.nix

43 lines
935 B
Nix
Raw Normal View History

2025-01-30 17:15:00 -07:00
{
pkgs,
lib,
...
2025-02-10 15:24:39 -07:00
} @ moduleInheritancePackage: let
2025-01-30 17:15:00 -07:00
# The name of the pdf viewer
name = "okular";
# The viewer template
template = import ./viewerTemplate.nix;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) package str listOf;
in (
template {
2025-02-10 15:24:39 -07:00
inherit name moduleInheritancePackage;
2025-01-30 17:15:00 -07:00
options = {
enable = mkEnableOption "enable okular as the pdf file previewer.";
package = mkOption {
type = package;
default = pkgs.okular;
description = "okular package";
};
executable = mkOption {
type = str;
default = "okular";
description = "The executable name to call the viewer.";
};
args = mkOption {
type = listOf str;
default = ["--unique" "file:%p#src:%l%f"];
2025-01-30 17:15:00 -07:00
description = "Arguments to pass to the viewer.";
};
};
argsFunction = viewerCfg: (viewerCfg.args);
2025-01-30 17:15:00 -07:00
}
)