Skip to content

stylix: allow mkTarget's configuration arguments to receive paths#1523

Merged
trueNAHO merged 1 commit intonix-community:masterfrom
trueNAHO:stylix-allow-mktarget-s-configelements-argument-to-receive-paths
Jun 26, 2025
Merged

stylix: allow mkTarget's configuration arguments to receive paths#1523
trueNAHO merged 1 commit intonix-community:masterfrom
trueNAHO:stylix-allow-mktarget-s-configelements-argument-to-receive-paths

Conversation

@trueNAHO
Copy link
Copy Markdown
Member

@trueNAHO trueNAHO commented Jun 20, 2025

Allow mkTarget's configElements and generalConfig arguments to receive
paths, streamlining the migration away from the config.lib.stylix.colors
function that depends on base16.nix [1] [2].

[1]: https://github.com/nix-community/stylix/issues/159#issuecomment-1937879216
[2]: https://github.com/nix-community/stylix/issues/249#issuecomment-2012933635

This resolves the concern raised in #1509 (comment).

Things done

Notify maintainers

@Flameopathic

@trueNAHO trueNAHO mentioned this pull request Jun 20, 2025
5 tasks
@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch 2 times, most recently from 92465f4 to 0c9eea2 Compare June 20, 2025 15:49
@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch from 0c9eea2 to bdaed50 Compare June 20, 2025 16:05
@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch from bdaed50 to c952d40 Compare June 21, 2025 13:51
@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch from c952d40 to 9e24013 Compare June 23, 2025 13:44
Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trueNAHO trueNAHO requested a review from Flameopathic June 24, 2025 20:45
Copy link
Copy Markdown
Contributor

@Flameopathic Flameopathic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good as-is, though it may be nice for generalConfig to be able to do this as well.

@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch from 9e24013 to 7f058e4 Compare June 25, 2025 00:41
@trueNAHO
Copy link
Copy Markdown
Member Author

it may be nice for generalConfig to be able to do this as well.

True. I added the same builtins.isPath logic to generalConfig. For consistency, I moved this check into the main logic. How exactly to clean this up, should be covered by #1512.

For reference, I have tested this patch by applying

diff --git a/modules/blender/hm.nix b/modules/blender/hm.nix
index 1503448..a3e7993 100644
--- a/modules/blender/hm.nix
+++ b/modules/blender/hm.nix
@@ -14,8 +14,8 @@ mkTarget {
   };

   configElements = [
-    (import ./color-theme.nix)
-    (import ./font-theme.nix)
+    ./color-theme.nix
+    ./font-theme.nix
     (
       { cfg }:
       {

on top of fe32d13 (#1509).

@trueNAHO trueNAHO requested review from 0xda157 and Flameopathic June 25, 2025 00:41
Allow mkTarget's configElements and generalConfig arguments to receive
paths, streamlining the migration away from the config.lib.stylix.colors
function that depends on base16.nix [1] [2].

[1]: nix-community#159 (comment)
[2]: nix-community#249 (comment)
@trueNAHO trueNAHO force-pushed the stylix-allow-mktarget-s-configelements-argument-to-receive-paths branch from 7f058e4 to a6fb536 Compare June 25, 2025 00:52
@trueNAHO trueNAHO changed the title stylix: allow mkTarget's configElements argument to receive paths stylix: allow mkTarget's configuration arguments to receive paths Jun 25, 2025
Copy link
Copy Markdown
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trueNAHO trueNAHO merged commit c700d41 into nix-community:master Jun 26, 2025
7 checks passed
stylix-automation bot pushed a commit that referenced this pull request Jun 26, 2025
)

Allow mkTarget's configElements and generalConfig arguments to receive
paths, streamlining the migration away from the config.lib.stylix.colors
function that depends on base16.nix [1] [2].

[1]: #159 (comment)
[2]: #249 (comment)

Link: #1523

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
(cherry picked from commit c700d41)
@stylix-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-25.05:

trueNAHO added a commit that referenced this pull request Jun 26, 2025
)

Allow mkTarget's configElements and generalConfig arguments to receive
paths, streamlining the migration away from the config.lib.stylix.colors
function that depends on base16.nix [1] [2].

[1]: #159 (comment)
[2]: #249 (comment)

Link: #1523

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
(cherry picked from commit c700d41)
LunaCOLON3 pushed a commit to LunaCOLON3/stylix that referenced this pull request Jul 14, 2025
…x-community#1523)

Allow mkTarget's configElements and generalConfig arguments to receive
paths, streamlining the migration away from the config.lib.stylix.colors
function that depends on base16.nix [1] [2].

[1]: nix-community#159 (comment)
[2]: nix-community#249 (comment)

Link: nix-community#1523

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants