fix(home-manager/zathura): avoid IFD (#298)
This commit is contained in:
parent
7e23de352f
commit
41d51d7f04
1 changed files with 4 additions and 14 deletions
|
@ -1,23 +1,13 @@
|
||||||
{
|
{ config, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
cfg = config.programs.zathura.catppuccin;
|
cfg = config.programs.zathura.catppuccin;
|
||||||
enable = cfg.enable && config.programs.zathura.enable;
|
enable = cfg.enable && config.programs.zathura.enable;
|
||||||
themeFile = sources.zathura + "/src/catppuccin-${cfg.flavor}";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt { name = "zathura"; };
|
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt { name = "zathura"; };
|
||||||
|
|
||||||
config.programs.zathura.options = lib.mkIf enable (
|
config.programs.zathura.extraConfig = lib.mkIf enable ''
|
||||||
lib.ctp.fromINI (
|
include ${sources.zathura + "/src/catppuccin-${cfg.flavor}"}
|
||||||
pkgs.runCommand "catppuccin-zathura-theme" { } ''
|
'';
|
||||||
${pkgs.gawk}/bin/awk '/.+/ { printf "%s=%s\n", $2, $3 }' ${themeFile} > $out
|
|
||||||
''
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue