Compare commits

...

4 commits

Author SHA1 Message Date
Tim Kleinschmidt
296aa01b46 opencode: brighten default text colors (#2100)
Some checks failed
Label Merge Conflicts / conflicts (push) Has been cancelled
Using base09 for diff hunk headers and base0A for markdown block quotes
made neutral UI elements look urgent. Markdown code blocks also reused
the default text color as a background, reducing contrast.

Return these components to neutral backgrounds instead: keep diff hunk
headers on base03, block quotes on base03/base01, and code blocks on
base01 so warnings stay on base0A and urgency cues remain meaningful.

Link: https://github.com/nix-community/stylix/pull/2100

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Approved-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Tested-by: Mirza Arnaut <mirza.arnaut45@gmail.com>
Approved-by: Mirza Arnaut <mirza.arnaut45@gmail.com>
(cherry picked from commit b135edbdd4)
2026-01-23 22:06:55 +01:00
NAHO
a387b3ac6c stylix/mk-target: remove redundant unconditionalConfig argument
Remove the redundant unconditionalConfig argument to simplify the
interface, as it is a subset of the existing config argument:

     { mkTarget, ... }:
     mkTarget {
    -  unconditionalConfig =
    +  config = _:
         lib.mkIf complexCondition { home.packages = [ pkgs.hello ]; };
     }

(cherry picked from commit 75e660b6a0)
2026-01-23 12:37:24 -08:00
NAHO
63fa437f13 stylix/mk-target: add missing comma to function arguments
Fixes: c4fa684471 ("stylix: add mkTarget function")
(cherry picked from commit bbcaeec0a6)
2026-01-23 12:37:24 -08:00
NAHO
06d93928d4 gtksourceview/template: align description with other themes (#2124)
Align the description with the /modules/discord/common/theme-header.nix
and /modules/vscode/package.json themes.

Link: https://github.com/nix-community/stylix/pull/2124

Reviewed-by: bricked <git@bricked.dev>
(cherry picked from commit 06684f00cf)
2026-01-23 21:31:10 +01:00
3 changed files with 29 additions and 49 deletions

View file

@ -2,7 +2,7 @@
<style-scheme id="stylix" _name="Stylix" version="1.0">
<author>Stylix</author>
<_description>Theme configured as part of your NixOS configuration.</_description>
<_description>Theme configured via NixOS or Home Manager.</_description>
<color name="base00" value="#{{base00-hex}}"/>
<color name="base01" value="#{{base01-hex}}"/>

View file

@ -12,7 +12,7 @@ mkTarget {
themes.${theme} = {
theme = {
accent = {
dark = colors.withHashtag.base07;
dark = colors.withHashtag.base0F;
light = colors.withHashtag.base07;
};
background = {
@ -72,7 +72,7 @@ mkTarget {
light = colors.withHashtag.base03;
};
diffLineNumber = {
dark = colors.withHashtag.base02;
dark = colors.withHashtag.base03;
light = colors.withHashtag.base04;
};
diffRemoved = {
@ -97,26 +97,26 @@ mkTarget {
};
markdownBlockQuote = {
dark = colors.withHashtag.base03;
light = colors.withHashtag.base03;
light = colors.withHashtag.base01;
};
markdownCode = {
dark = colors.withHashtag.base0B;
light = colors.withHashtag.base0B;
};
markdownCodeBlock = {
dark = colors.withHashtag.base04;
dark = colors.withHashtag.base01;
light = colors.withHashtag.base00;
};
markdownEmph = {
dark = colors.withHashtag.base09;
dark = colors.withHashtag.base0A;
light = colors.withHashtag.base09;
};
markdownHeading = {
dark = colors.withHashtag.base0C;
dark = colors.withHashtag.base0E;
light = colors.withHashtag.base0F;
};
markdownHorizontalRule = {
dark = colors.withHashtag.base03;
dark = colors.withHashtag.base04;
light = colors.withHashtag.base03;
};
markdownImage = {
@ -124,7 +124,7 @@ mkTarget {
light = colors.withHashtag.base0D;
};
markdownImageText = {
dark = colors.withHashtag.base07;
dark = colors.withHashtag.base0C;
light = colors.withHashtag.base07;
};
markdownLink = {
@ -132,31 +132,31 @@ mkTarget {
light = colors.withHashtag.base0D;
};
markdownLinkText = {
dark = colors.withHashtag.base07;
dark = colors.withHashtag.base0C;
light = colors.withHashtag.base07;
};
markdownListEnumeration = {
dark = colors.withHashtag.base07;
dark = colors.withHashtag.base0C;
light = colors.withHashtag.base07;
};
markdownListItem = {
dark = colors.withHashtag.base0C;
dark = colors.withHashtag.base0D;
light = colors.withHashtag.base0F;
};
markdownStrong = {
dark = colors.withHashtag.base0A;
dark = colors.withHashtag.base09;
light = colors.withHashtag.base0A;
};
markdownText = {
dark = colors.withHashtag.base04;
dark = colors.withHashtag.base05;
light = colors.withHashtag.base00;
};
primary = {
dark = colors.withHashtag.base0C;
dark = colors.withHashtag.base0D;
light = colors.withHashtag.base0F;
};
secondary = {
dark = colors.withHashtag.base0D;
dark = colors.withHashtag.base0E;
light = colors.withHashtag.base0D;
};
success = {
@ -164,29 +164,29 @@ mkTarget {
light = colors.withHashtag.base0B;
};
syntaxComment = {
dark = colors.withHashtag.base03;
dark = colors.withHashtag.base04;
light = colors.withHashtag.base03;
};
syntaxFunction = {
dark = colors.withHashtag.base0C;
dark = colors.withHashtag.base0D;
light = colors.withHashtag.base0C;
};
syntaxKeyword = {
dark = colors.withHashtag.base0D;
dark = colors.withHashtag.base0E;
light = colors.withHashtag.base0D;
};
syntaxNumber = {
dark = colors.withHashtag.base0E;
dark = colors.withHashtag.base09;
light = colors.withHashtag.base0E;
};
syntaxOperator = {
dark = colors.withHashtag.base0D;
dark = colors.withHashtag.base0C;
light = colors.withHashtag.base0D;
};
syntaxPunctuation = {
dark = colors.withHashtag.base04;
dark = colors.withHashtag.base05;
light = colors.withHashtag.base00;
};
syntaxString = {
@ -194,7 +194,7 @@ mkTarget {
light = colors.withHashtag.base0B;
};
syntaxType = {
dark = colors.withHashtag.base07;
dark = colors.withHashtag.base0A;
light = colors.withHashtag.base07;
};
syntaxVariable = {
@ -202,16 +202,16 @@ mkTarget {
light = colors.withHashtag.base07;
};
text = {
dark = colors.withHashtag.base04;
dark = colors.withHashtag.base05;
light = colors.withHashtag.base00;
};
textMuted = {
dark = colors.withHashtag.base03;
dark = colors.withHashtag.base04;
light = colors.withHashtag.base01;
};
warning = {
dark = colors.withHashtag.base09;
light = colors.withHashtag.base09;
dark = colors.withHashtag.base0A;
light = colors.withHashtag.base0A;
};
};
};

View file

@ -17,13 +17,8 @@
follows:
```nix
{ mkTarget, lib... }:
{ mkTarget, lib, ... }:
mkTarget {
unconditionalConfig =
lib.mkIf complexCondition {
home.packages = [ pkgs.hello ];
};
config = [
{ programs.«name».theme.name = "stylix"; }
@ -125,11 +120,6 @@
: The target name used to generate options in the `stylix.targets.${name}`
namespace.
`unconditionalConfig` (Attribute set or function or path)
: This argument mirrors the `config` argument but intentionally lacks
automatic safeguarding and should only be used for complex configurations
where `config` is unsuitable.
# Environment
The function is provided alongside module arguments in any modules imported
@ -143,12 +133,6 @@
# of modules:
#
# {
# unconditionalConfig =
# { lib, pkgs }:
# lib.mkIf complexCondition {
# home.packages = [ pkgs.hello ];
# };
#
# config = [
# { programs.example.theme.name = "stylix"; }
#
@ -182,7 +166,6 @@ in
imports ? [ ],
name ? name',
options ? [ ],
unconditionalConfig ? { },
}@args:
let
mkTargetConfig = config;
@ -341,10 +324,7 @@ let
config.lib.stylix.mkEnableTargetWith enableArgs;
config = lib.mkIf (config.stylix.enable && cfg.enable) (
lib.mkMerge (
lib.singleton (callModule false unconditionalConfig)
++ map (callModule true) normalizedConfig
)
lib.mkMerge (map (callModule true) normalizedConfig)
);
};
in