11.stylix/modules/blender/hm.nix
Louis Dalibard cb01ed1152
blender: add support for version 4.5 (#1766)
Link: https://github.com/nix-community/stylix/pull/1766

Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-07-27 18:53:17 +02:00

53 lines
1.1 KiB
Nix

{
mkTarget,
lib,
...
}:
mkTarget {
name = "blender";
humanName = "Blender";
extraOptions.themeBody = lib.mkOption {
type = lib.types.lines;
default = "";
internal = true;
};
configElements = [
./color-theme.nix
./font-theme.nix
(
{ cfg }:
{
xdg.configFile =
let
indent =
string: " " + lib.concatStringsSep "\n " (lib.splitString "\n" string);
in
lib.mkIf (cfg.themeBody != "") (
builtins.listToAttrs (
map
(
version:
lib.nameValuePair
"blender/${version}/scripts/presets/interface_theme/Stylix.xml"
{
text = lib.concatLines [
"<bpy>"
(indent cfg.themeBody)
"</bpy>"
];
}
)
[
"4.2"
"4.3"
"4.4"
"4.5"
]
)
);
}
)
];
}