fix(zathura): use absolute path for matugen config and ensure file exists

- 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.
This commit is contained in:
kenji
2026-01-15 16:08:45 -06:00
parent b550064a15
commit e7e5226c87
+8 -2
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, lib, ... }:
{
programs.zathura = {
enable = true;
@@ -12,9 +12,15 @@
zoom-min = 10;
recolor = true;
};
extraConfig = "include zathura-matugen";
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 = {