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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user