From da313f6398b86c7c7116552a2d3df2bf88c6b885 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 4 Aug 2024 15:23:39 +0300 Subject: [PATCH] Nix module: add package option This allows users to set a different package, for example pkgs.matugen. Co-authored-by: Amadej Kastelic --- module.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module.nix b/module.nix index 212becb..d00d2df 100644 --- a/module.nix +++ b/module.nix @@ -39,7 +39,7 @@ matugen: { cd $out export HOME=$(pwd) - ${pkg}/bin/matugen \ + ${cfg.package}/bin/matugen \ image ${cfg.wallpaper} \ ${ if cfg.templates != {} @@ -57,6 +57,12 @@ in { options.programs.matugen = { enable = lib.mkEnableOption "Matugen declarative theming"; + package = + lib.mkPackageOption pkgs "matugen" {} + // { + default = pkg; + }; + wallpaper = lib.mkOption { description = "Path to `wallpaper` that matugen will generate the colorschemes from"; type = lib.types.path;