From e7e5226c87ce255e8c64488446b86e1fad91899b Mon Sep 17 00:00:00 2001 From: kenji Date: Thu, 15 Jan 2026 16:08:45 -0600 Subject: [PATCH] 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. --- apps/zathura/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/zathura/default.nix b/apps/zathura/default.nix index 99912f2..c46df28 100644 --- a/apps/zathura/default.nix +++ b/apps/zathura/default.nix @@ -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 = {