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>
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)
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)
Update all inputs, rename the KDE platform, and apply formatter changes
by running the following commands:
biome check --unsafe --write
pre-commit run --all-files
Rename the KDE platform, following local commit f47c0edcf7 ("treewide:
remove Plasma 5 support dropped upstream (#1860)") and upstream commits
[1] ("nixos/treewide: clean up some more references to deleted qt5
things") and [2] ("qt: deprecate kde6").
[1]: 31d5c4e753
[2]: 1e759786e5
Closes: https://github.com/nix-community/stylix/issues/1865
Link: https://github.com/nix-community/stylix/pull/1866
Link: https://github.com/nix-community/stylix/pull/1881
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Co-authored-by: Samuel Meenzen <samuel@meenzen.net>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
Previously the space was sanitized away by `fetchurl` because it was
part of the derivation name. Also, the path with a space was not used
in the `schemeless` theme, which is where the bug happened.
Add the Flake Parts tree into the testbed environment, enabling
realistic testing interactions.
Flake Parts is chosen over Stylix to reduce cache invalidations, and
over other flake inputs as the smallest tree.