Allow an impure absolute stylix.image path for end-user convenience by
relaxing the guarantees established in commits ca1bc329e9
("stylix/palette: coerce derivations to store paths") and 61c9f4dd14
("treewide: remove redundant stylix.image escaping and string
coercion").
When stylix.image cannot be copied to the store, it is not guaranteed to
be a stringified store path with a valid string context and no special
characters, resulting in UB.
Link: https://github.com/nix-community/stylix/pull/2150
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: 0xda157 <da157@voidq.com>
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)
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)
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)
Remove redundant shell escaping and string coercion as stylix.image is
guaranteed to be a stringified store path with a valid string context
and no special characters.
Fixes: 3499e3ec70 ("treewide: properly quote stylix.image when used as a shell argument")
(cherry picked from commit 61c9f4dd14)
Coerce derivations to store paths to ensure non-null values are
stringified store paths with valid string contexts.
Fixes: 838df8b8ad ("stylix: improve `stylix.image` type (#1414)")
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
(cherry picked from commit ca1bc329e9)
Rename the normalizeConfig function to normalize to generalize the name
beyond the specific config and options module arguments, following
commit 1272e6858e ("stylix/mk-target: rename mkConfig function to
callModule").
Fixes: 6153df31ce ("stylix/mk-target: normalize options argument identically to config")
Link: https://github.com/nix-community/stylix/pull/2081
(cherry picked from commit cb6bbed75e)
Generate targets.${target}.${argument}.enable and
targets.${target}.${argument}.override options for disabling and
configuring safeguarded arguments on a target level.
(cherry picked from commit 953c3fb01e)
Optionalize mkTarget's 'humanName' and 'name' arguments by inferring
'humanName' from the 'name' attribute in the /modules/<MODULE>/meta.nix
file, and 'name' from the /modules/<NAME>/ directory name.
Inferring the 'humanName' and 'name' arguments ensures consistency and
reduces boilerplate.
The 'humanName' and 'name' arguments are optionalized instead of removed
because complex modules generating target derivations need to
distinguish between them.
Closes: https://github.com/nix-community/stylix/issues/1661
(cherry picked from commit dfc859f54d)
Rename mkTarget's 'configElements' argument to 'config' and
'extraOptions' to 'options' to provide a more transparent interface with
the underlying Nixpkgs module system.
(cherry picked from commit 16df6b8448)
Polish the mkTarget implementation to improve error reporting and
simplify future enhancements.
Configuration elements can now recursively resolve to paths.
(cherry picked from commit f7b554dea9)
Rename the mkConfig function to callModule to generalize the name beyond
the specific config and options module arguments.
Fixes: dea0337e0b ("stylix: restrict access to config while using mkTarget (#1368)")
(cherry picked from commit 1272e6858e)
Use one atomic commit to simplify the commit history and prevent the
previous commits from individually breaking CI.
(cherry picked from commit b01dbcdc08)