foot: use mkTarget

This commit is contained in:
awwpotato 2025-05-21 13:56:38 -07:00
parent 910dc0dc3e
commit 89edd2f3c0
No known key found for this signature in database

View file

@ -1,20 +1,31 @@
{ config, lib, ... }:
{
options.stylix.targets.foot.enable =
config.lib.stylix.mkEnableTarget "Foot" true;
{ mkTarget, ... }:
mkTarget {
name = "foot";
humanName = "Foot";
config.programs.foot.settings = lib.mkIf config.stylix.targets.foot.enable {
main = {
include = toString (
config.lib.stylix.colors {
templateRepo = config.stylix.inputs.tinted-foot;
}
);
font =
with config.stylix.fonts;
"${monospace.name}:size=${toString sizes.terminal}";
dpi-aware = "no";
};
colors.alpha = config.stylix.opacity.terminal;
};
configElements = [
(
{ 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;
});
}
)
];
}