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
28 lines
543 B
Nix
28 lines
543 B
Nix
{ mkTarget, ... }:
|
|
mkTarget {
|
|
config = [
|
|
(
|
|
{ fonts }:
|
|
{
|
|
programs.foot.settings.main = {
|
|
font = "${fonts.monospace.name}:size=${toString fonts.sizes.terminal}";
|
|
dpi-aware = "no";
|
|
};
|
|
}
|
|
)
|
|
(
|
|
{ opacity }:
|
|
{
|
|
programs.foot.settings.colors.alpha = opacity.terminal;
|
|
}
|
|
)
|
|
(
|
|
{ colors, inputs }:
|
|
{
|
|
programs.foot.settings.main.include = toString (colors {
|
|
templateRepo = inputs.tinted-foot;
|
|
});
|
|
}
|
|
)
|
|
];
|
|
}
|