alacritty: fix mkTarget usage (#1332)

Link: https://github.com/nix-community/stylix/pull/1332

Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
This commit is contained in:
awwpotato 2025-05-21 10:14:34 -07:00 committed by GitHub
parent d3fadda72a
commit 4ce349da56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,53 +1,49 @@
# Documentation is available at:
# - https://alacritty.org/config-alacritty.html
# - `man 5 alacritty`
{ config, mkTarget, ... }:
{ mkTarget, ... }:
mkTarget {
name = "alacritty";
humanName = "Alacritty";
configElements = [
(
{ colors }:
with colors.withHashtag;
{
programs.alacritty.settings = {
window.opacity = config.stylix.opacity.terminal;
colors = with colors; {
primary = {
foreground = base05;
background = base00;
bright_foreground = base07;
};
selection = {
text = base05;
background = base02;
};
cursor = {
text = base00;
cursor = base05;
};
normal = {
black = base00;
white = base05;
inherit
red
green
yellow
blue
magenta
cyan
;
};
bright = {
black = base03;
white = base07;
red = bright-red;
green = bright-green;
yellow = bright-yellow;
blue = bright-blue;
magenta = bright-magenta;
cyan = bright-cyan;
};
programs.alacritty.settings.colors = with colors.withHashtag; {
primary = {
foreground = base05;
background = base00;
bright_foreground = base07;
};
selection = {
text = base05;
background = base02;
};
cursor = {
text = base00;
cursor = base05;
};
normal = {
black = base00;
white = base05;
inherit
red
green
yellow
blue
magenta
cyan
;
};
bright = {
black = base03;
white = base07;
red = bright-red;
green = bright-green;
yellow = bright-yellow;
blue = bright-blue;
magenta = bright-magenta;
cyan = bright-cyan;
};
};
}
@ -67,7 +63,7 @@ mkTarget {
(
{ opacity }:
{
programs.alacritty.settings.window.opacity = config.stylix.opacity.terminal;
programs.alacritty.settings.window.opacity = opacity.terminal;
}
)
];