From 4ce349da56e075f7e3456b48731cbbf5ae8b1eb8 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 21 May 2025 10:14:34 -0700 Subject: [PATCH] alacritty: fix mkTarget usage (#1332) Link: https://github.com/nix-community/stylix/pull/1332 Reviewed-by: Matt Sturgeon --- modules/alacritty/hm.nix | 78 +++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/modules/alacritty/hm.nix b/modules/alacritty/hm.nix index a39beb08..ed54e3bb 100644 --- a/modules/alacritty/hm.nix +++ b/modules/alacritty/hm.nix @@ -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; } ) ];