niksos/modules/gui/zathura.nix

37 lines
977 B
Nix

{
config,
lib,
...
}: let
cfg = config.poz.programs.zathura;
inherit (config.poz.other.system) username;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr path;
in {
options.poz.programs.zathura = {
enable = mkEnableOption "zathura";
themeFile = mkOption {
type = nullOr path;
description = "path to theme file";
default = null;
};
};
config = mkIf cfg.enable {
home-manager.users.${username} = {
xdg.configFile."zathura/theme".source = mkIf (cfg.themeFile != null) cfg.themeFile;
programs.zathura = {
enable = true;
extraConfig = mkIf (cfg.themeFile != null) ''
include theme
'';
options = {
selection-clipboard = "clipboard";
};
};
};
};
}