summaryrefslogtreecommitdiff
path: root/modules/apps/alacritty.nix
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-27 16:39:14 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-27 16:39:14 -0400
commit2e4c4298cf84f94d68387e8076fd430e9968ce6c (patch)
tree2a43fa6d4659fe2585c75aeec3ee4d5e0a42de2e /modules/apps/alacritty.nix
parentfmt (diff)
downloaddotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.gz
dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.bz2
dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.zip
refactor
Diffstat (limited to 'modules/apps/alacritty.nix')
-rw-r--r--modules/apps/alacritty.nix99
1 files changed, 99 insertions, 0 deletions
diff --git a/modules/apps/alacritty.nix b/modules/apps/alacritty.nix
new file mode 100644
index 0000000..b50e142
--- /dev/null
+++ b/modules/apps/alacritty.nix
@@ -0,0 +1,99 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.apps;
+in {
+ config = mkIf cfg.alacritty {
+ default.terminal = lib.mkDefault "alacritty";
+
+ home-manager.users.${config.user} = {
+ programs.alacritty = {
+ enable = true;
+
+ settings = {
+ # Font
+ font = {
+ size = 11;
+ bold = {
+ style = "Bold";
+ };
+ bold_italic = {
+ style = "Bold Italic";
+ };
+ italic = {
+ style = "Italic";
+ };
+ normal = {
+ family = config.theme.font.monospace;
+ style = "Regular";
+ };
+ offset = {
+ x = 0;
+ y = 0;
+ };
+ };
+
+ # Window
+ window = {
+ decorations = "full";
+ dynamic_title = true;
+ padding = {
+ x = config.theme.outerGap;
+ y = config.theme.outerGap;
+ };
+ opacity = config.theme.opacity;
+ };
+
+ # Colors
+ colors = {
+ normal = lib.attrsets.mapAttrs (name: color: "${color}") {
+ inherit
+ (config.theme.colors.normal)
+ black
+ red
+ green
+ yellow
+ blue
+ magenta
+ cyan
+ white
+ ;
+ };
+
+ bright = lib.attrsets.mapAttrs (name: color: "${color}") {
+ inherit
+ (config.theme.colors.bright)
+ black
+ red
+ green
+ yellow
+ blue
+ magenta
+ cyan
+ white
+ ;
+ };
+
+ cursor = {
+ background = "CellForeground";
+ text = "CellBackground";
+ };
+
+ selection = {
+ background = "CellForeground";
+ text = "CellBackground";
+ };
+
+ primary = {
+ foreground = "#${config.theme.colors.text}";
+ background = "#${config.theme.colors.base}";
+ };
+ };
+ };
+ };
+ };
+ };
+}