diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 1252d85..81631cd 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -128,7 +128,13 @@ in { enable = true; enableLsp = true; }; - zathura.enable = true; + zathura = { + enable = true; + themeFile = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha"; + hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q="; + }; + }; hypr = { land = { enable = true; diff --git a/hosts/hape/configuration.nix b/hosts/hape/configuration.nix index 55a02a2..e5ef3ff 100644 --- a/hosts/hape/configuration.nix +++ b/hosts/hape/configuration.nix @@ -1,5 +1,6 @@ { config, + pkgs, ... }: { services = { @@ -39,7 +40,13 @@ foot.enable = true; mpv.enable = true; neovim.enable = true; - zathura.enable = true; + zathura = { + enable = true; + themeFile = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha"; + hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q="; + }; + }; hypr = { land.enable = true; lock.enable = true; diff --git a/hosts/niks/configuration.nix b/hosts/niks/configuration.nix index 8a175f1..8a9fe15 100644 --- a/hosts/niks/configuration.nix +++ b/hosts/niks/configuration.nix @@ -87,7 +87,13 @@ in { enable = true; enableLsp = true; }; - zathura.enable = true; + zathura = { + enable = true; + themeFile = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha"; + hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q="; + }; + }; hypr = { land = { enable = true; diff --git a/hosts/work/configuration.nix b/hosts/work/configuration.nix index 34d5eb7..1b83bd6 100644 --- a/hosts/work/configuration.nix +++ b/hosts/work/configuration.nix @@ -81,7 +81,13 @@ in { enable = true; enableLsp = true; }; - zathura.enable = true; + zathura = { + enable = true; + themeFile = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha"; + hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q="; + }; + }; hypr = { land = { enable = true; diff --git a/modules/gui/zathura.nix b/modules/gui/zathura.nix index 4c80f81..1354d1e 100644 --- a/modules/gui/zathura.nix +++ b/modules/gui/zathura.nix @@ -1,28 +1,32 @@ { config, lib, - pkgs, ... }: let cfg = config.poz.programs.zathura; inherit (config.poz.other.system) username; inherit (lib.modules) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) nullOr path; in { - options.poz.programs.zathura.enable = mkEnableOption "zathura"; + 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/catppuccin-mocha".source = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha"; - hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q="; - }; + xdg.configFile."zathura/theme".source = mkIf (cfg.themeFile != null) cfg.themeFile; programs.zathura = { enable = true; - extraConfig = '' - include catppuccin-mocha + extraConfig = mkIf (cfg.themeFile != null) '' + include theme ''; options = { selection-clipboard = "clipboard";