zathura: allow configuring the package used (#1636)

Closes #1633
This commit is contained in:
Nicolas Berbiche 2020-12-04 12:38:22 -05:00 committed by GitHub
parent 0654364426
commit 005ea6cc18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,13 @@ in {
Zathura, a highly customizable and functional document viewer Zathura, a highly customizable and functional document viewer
focused on keyboard interaction''; focused on keyboard interaction'';
package = mkOption {
type = types.package;
default = pkgs.zathura;
defaultText = "pkgs.zathura";
description = "The Zathura package to use";
};
options = mkOption { options = mkOption {
default = { }; default = { };
type = with types; attrsOf (either str (either bool int)); type = with types; attrsOf (either str (either bool int));
@ -49,7 +56,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.zathura ]; home.packages = [ cfg.package ];
xdg.configFile."zathura/zathurarc".text = concatStringsSep "\n" ([ ] xdg.configFile."zathura/zathurarc".text = concatStringsSep "\n" ([ ]
++ optional (cfg.extraConfig != "") cfg.extraConfig ++ optional (cfg.extraConfig != "") cfg.extraConfig