11.stylix/modules/blender/hm.nix
Lucas Eduardo c1ac8e9b3f
blender: add more versions (#1886)
Link: https://github.com/nix-community/stylix/pull/1886

Signed-off-by: lucasew <lucas59356@gmail.com>
Reviewed-by: Louis Dalibard <louis.dalibard@gmail.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-09-06 13:53:52 +00:00

62 lines
1.3 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>"
];
}
)
[
"3.0"
"3.1"
"3.2"
"3.3"
"3.4"
"3.5"
"3.6"
"4.0"
"4.1"
"4.2"
"4.3"
"4.4"
"4.5"
]
)
);
}
)
];
}