e7e5226c87
- Updated 'extraConfig' to use an absolute path for the 'zathura-matugen' include, fixing path resolution issues. - Added a home activation script to create an empty 'zathura-matugen' file if it doesn't exist, preventing zathura from crashing on fresh installs before matugen has run.
31 lines
819 B
Nix
31 lines
819 B
Nix
{ pkgs, config, lib, ... }:
|
|
{
|
|
programs.zathura = {
|
|
enable = true;
|
|
options = {
|
|
selection-clipboard = "clipboard";
|
|
adjust-open = "best-fit";
|
|
pages-per-row = 1;
|
|
scroll-page-aware = "true";
|
|
scroll-full-overlap = "0.01";
|
|
scroll-step = 100;
|
|
zoom-min = 10;
|
|
recolor = true;
|
|
};
|
|
extraConfig = "include ${config.home.homeDirectory}/.config/zathura/zathura-matugen";
|
|
};
|
|
|
|
home.activation.createZathuraMatugen = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
if [ ! -f "${config.home.homeDirectory}/.config/zathura/zathura-matugen" ]; then
|
|
touch "${config.home.homeDirectory}/.config/zathura/zathura-matugen"
|
|
fi
|
|
'';
|
|
|
|
xdg.mimeApps = {
|
|
enable = true;
|
|
defaultApplications = {
|
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
|
};
|
|
};
|
|
}
|