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)
24 lines
814 B
Nix
24 lines
814 B
Nix
{ mkTarget, ... }:
|
|
mkTarget {
|
|
# Referenced https://github.com/stacyharper/base16-mako
|
|
config =
|
|
{ colors, opacity }:
|
|
{
|
|
services.avizo = {
|
|
settings = {
|
|
default =
|
|
with colors;
|
|
let
|
|
aviOpacity = toString opacity.popups;
|
|
in
|
|
{
|
|
background = "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, ${aviOpacity})";
|
|
border-color = "rgba(${base0D-rgb-r}, ${base0D-rgb-g}, ${base0D-rgb-b}, ${aviOpacity})";
|
|
bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, ${aviOpacity})";
|
|
bar-bg-color = "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, ${aviOpacity})";
|
|
image-opacity = aviOpacity;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|