From f6d80a44d11565e377beb68ff8995d10cb33ff34 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sat, 27 Jul 2024 21:23:26 +0800 Subject: [PATCH] wrapper-manager/programs/blender: refactor --- modules/wrapper-manager/programs/blender.nix | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/wrapper-manager/programs/blender.nix b/modules/wrapper-manager/programs/blender.nix index a05b80d5..1798c64f 100644 --- a/modules/wrapper-manager/programs/blender.nix +++ b/modules/wrapper-manager/programs/blender.nix @@ -51,13 +51,18 @@ in }; }; - config = lib.mkIf cfg.enable { - basePackages = [ cfg.package ]; + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + basePackages = [ cfg.package ]; - # TODO: Should we replace the .desktop file for this? - wrappers.blender = { - arg0 = lib.getExe' cfg.package "blender"; - env.BLENDER_SYSTEM_RESOURCES.value = lib.mkIf (builtins.length cfg.addons > 0) addons; - }; - }; + # TODO: Should we replace the .desktop file for this? + wrappers.blender = { + arg0 = lib.getExe' cfg.package "blender"; + }; + } + + (lib.mkIf (builtins.length cfg.addons > 0) { + wrappers.blender.env.BLENDER_SYSTEM_RESOURCES.value = addons; + }) + ]); }