aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/al
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-24 11:01:47 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-24 11:01:47 +0200
commita313260ac9184327afafb8524a1778900000ace9 (patch)
tree59a7dfe5fa34414c97f0849d274f37576475815b /modules/by-name/al
parentmodules/ssh: Adapt to home-manager module changes (diff)
downloadnixos-config-a313260ac9184327afafb8524a1778900000ace9.zip
modules/legacy/{rofi,alacritty}: Migrate to by-name
Diffstat (limited to 'modules/by-name/al')
-rw-r--r--modules/by-name/al/alacritty/module.nix468
-rw-r--r--modules/by-name/al/alacritty/theme.toml89
2 files changed, 557 insertions, 0 deletions
diff --git a/modules/by-name/al/alacritty/module.nix b/modules/by-name/al/alacritty/module.nix
new file mode 100644
index 00000000..33db0d3e
--- /dev/null
+++ b/modules/by-name/al/alacritty/module.nix
@@ -0,0 +1,468 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+{
+ config,
+ lib,
+ pkgs,
+ libraries,
+ ...
+}: let
+ cfg = config.soispha.programs.alacritty;
+in {
+ options.soispha.programs.alacritty = {
+ enable = libraries.base.options.mkEnable "alacritty";
+
+ package = lib.mkPackageOption pkgs "alacritty" {};
+ };
+
+ config = lib.mkIf cfg.enable {
+ home-manager.users.soispha = {
+ home.sessionVariables = {
+ # This is **not** the TERM variable but a special one to signify my favorite terminal.
+ TERMINAL = "alacritty";
+ };
+
+ programs.alacritty = {
+ enable = true;
+ inherit (cfg) package;
+
+ settings = {
+ bell = {
+ duration = 0;
+ };
+
+ colors = builtins.fromTOML (builtins.readFile ./theme.toml);
+
+ cursor = {
+ blink_interval = 750;
+ blink_timeout = 5;
+ style = {
+ blinking = "On";
+ shape = "Beam";
+ };
+ thickness = 0.15;
+ unfocused_hollow = true;
+ vi_mode_style = "None";
+ };
+
+ env = {
+ COLORTERM = "truecolor";
+ TERM = "alacritty";
+ };
+
+ font = {
+ builtin_box_drawing = true;
+ glyph_offset = {
+ x = -1;
+ y = -1;
+ };
+ normal = {
+ family = "SauceCodePro Nerd Font Mono";
+ style = "Regular";
+ };
+ offset = {
+ x = -1;
+ y = -1;
+ };
+ size = 12;
+ };
+
+ general = {
+ ipc_socket = true;
+ live_config_reload = true;
+ };
+
+ hints = {
+ alphabet = "jfkdls;ahgurieowpq";
+ enabled = [
+ {
+ binding = {
+ key = "U";
+ mods = "Control|Shift";
+ };
+ command = "xdg-open";
+ hyperlinks = true;
+ mouse = {
+ enabled = true;
+ };
+ persist = false;
+ post_processing = true;
+ regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^";
+ }
+ {
+ action = "Paste";
+ binding = {
+ key = "T";
+ mods = "Control|Shift";
+ };
+ post_processing = false;
+ regex = "([^ '\"`=:\\[\\(]*/)([^/: '\"`\\)\\]]*)";
+ }
+ {
+ action = "Paste";
+ binding = {
+ key = "H";
+ mods = "Control|Shift";
+ };
+ post_processing = false;
+ regex = "([a-z0-9]{7,40})\\s";
+ }
+ ];
+ };
+
+ keyboard = {
+ bindings = [
+ {
+ action = "Paste";
+ key = "P";
+ mods = "Control";
+ }
+ {
+ action = "Paste";
+ key = "Insert";
+ mods = "Shift";
+ }
+ {
+ chars = "gc";
+ key = "Slash";
+ mods = "Control";
+ }
+ {
+ action = "Copy";
+ key = "Y";
+ mods = "Control";
+ }
+ {
+ action = "ResetFontSize";
+ key = "Key0";
+ mods = "Control";
+ }
+ {
+ action = "IncreaseFontSize";
+ key = "Equals";
+ mods = "Control";
+ }
+ {
+ action = "IncreaseFontSize";
+ key = "Plus";
+ mods = "Control";
+ }
+ {
+ action = "DecreaseFontSize";
+ key = "Minus";
+ mods = "Control";
+ }
+ {
+ action = "ToggleViMode";
+ key = "Space";
+ mods = "Control";
+ }
+ {
+ action = "ScrollToBottom";
+ key = "Space";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollToBottom";
+ key = "I";
+ mode = "Vi";
+ }
+ {
+ action = "ToggleViMode";
+ key = "I";
+ mode = "Vi";
+ }
+ {
+ action = "ScrollToBottom";
+ key = "C";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ToggleViMode";
+ key = "C";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ClearSelection";
+ key = "Escape";
+ mode = "Vi";
+ }
+ {
+ action = "ScrollLineUp";
+ key = "Y";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollLineDown";
+ key = "E";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollToTop";
+ key = "G";
+ mode = "Vi";
+ }
+ {
+ action = "ScrollToBottom";
+ key = "G";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "ScrollPageUp";
+ key = "B";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollPageDown";
+ key = "F";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollHalfPageUp";
+ key = "U";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ScrollHalfPageDown";
+ key = "D";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "Copy";
+ key = "Y";
+ mode = "Vi";
+ }
+ {
+ action = "ClearSelection";
+ key = "Y";
+ mode = "Vi";
+ }
+ {
+ action = "ToggleNormalSelection";
+ key = "V";
+ mode = "Vi";
+ }
+ {
+ action = "ToggleLineSelection";
+ key = "V";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "ToggleBlockSelection";
+ key = "V";
+ mode = "Vi";
+ mods = "Control";
+ }
+ {
+ action = "ToggleSemanticSelection";
+ key = "V";
+ mode = "Vi";
+ mods = "Alt";
+ }
+ {
+ action = "Open";
+ key = "Return";
+ mode = "Vi";
+ }
+ {
+ action = "Up";
+ key = "K";
+ mode = "Vi";
+ }
+ {
+ action = "Down";
+ key = "J";
+ mode = "Vi";
+ }
+ {
+ action = "Left";
+ key = "H";
+ mode = "Vi";
+ }
+ {
+ action = "Right";
+ key = "L";
+ mode = "Vi";
+ }
+ {
+ action = "Up";
+ key = "Up";
+ mode = "Vi";
+ }
+ {
+ action = "Down";
+ key = "Down";
+ mode = "Vi";
+ }
+ {
+ action = "Left";
+ key = "Left";
+ mode = "Vi";
+ }
+ {
+ action = "Right";
+ key = "Right";
+ mode = "Vi";
+ }
+ {
+ action = "First";
+ key = "Key0";
+ mode = "Vi";
+ }
+ {
+ action = "Last";
+ key = "Key4";
+ mode = "Vi";
+ }
+ {
+ action = "FirstOccupied";
+ key = "Key6";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "High";
+ key = "H";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "Middle";
+ key = "M";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "Low";
+ key = "L";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "SemanticLeft";
+ key = "B";
+ mode = "Vi";
+ }
+ {
+ action = "SemanticRight";
+ key = "W";
+ mode = "Vi";
+ }
+ {
+ action = "SemanticRightEnd";
+ key = "E";
+ mode = "Vi";
+ }
+ {
+ action = "WordLeft";
+ key = "B";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "WordRight";
+ key = "W";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "WordRightEnd";
+ key = "E";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "Bracket";
+ key = "Key5";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "SearchForward";
+ key = "Slash";
+ mode = "Vi";
+ }
+ {
+ action = "SearchBackward";
+ key = "Slash";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ {
+ action = "SearchNext";
+ key = "N";
+ mode = "Vi";
+ }
+ {
+ action = "SearchPrevious";
+ key = "N";
+ mode = "Vi";
+ mods = "Shift";
+ }
+ ];
+ };
+
+ mouse = {
+ bindings = [
+ {
+ action = "Copy";
+ mouse = "Middle";
+ }
+ ];
+ hide_when_typing =
+ false;
+ };
+
+ scrolling = {
+ history = 10000;
+ multiplier = 3;
+ };
+
+ selection = {
+ save_to_clipboard = false;
+ semantic_escape_chars = ",│`|:\"' ()[]{}<>\t";
+ };
+
+ window = {
+ class = {
+ general = "Alacritty";
+ instance = "Alacritty";
+ };
+ decorations = "none";
+ decorations_theme_variant = "None";
+ dimensions = {
+ columns = 0;
+ lines = 0;
+ };
+ dynamic_title = true;
+ opacity = 0.9;
+ padding = {
+ x = 5;
+ y = 5;
+ };
+ startup_mode = "Windowed";
+ title = "Alacritty";
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/by-name/al/alacritty/theme.toml b/modules/by-name/al/alacritty/theme.toml
new file mode 100644
index 00000000..2b326e43
--- /dev/null
+++ b/modules/by-name/al/alacritty/theme.toml
@@ -0,0 +1,89 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
+# Nightfox Alacritty Colors
+## name: carbonfox
+## upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/carbonfox/alacritty.toml
+
+[primary]
+background = "#161616"
+foreground = "#f2f4f8"
+dim_foreground = "#b6b8bb"
+bright_foreground = "#f9fbff"
+
+[cursor]
+text = "#f2f4f8"
+cursor = "#b6b8bb"
+
+[vi_mode_cursor]
+text = "#f2f4f8"
+cursor = "#33b1ff"
+
+[search.matches]
+foreground = "#f2f4f8"
+background = "#525253"
+
+[search.focused_match]
+foreground = "#f2f4f8"
+background = "#3ddbd9"
+
+[footer_bar]
+foreground = "#f2f4f8"
+background = "#353535"
+
+[hints.start]
+foreground = "#f2f4f8"
+background = "#3ddbd9"
+
+[hints.end]
+foreground = "#f2f4f8"
+background = "#353535"
+
+[selection]
+text = "#f2f4f8"
+background = "#2a2a2a"
+
+[normal]
+black = "#282828"
+red = "#ee5396"
+green = "#25be6a"
+yellow = "#08bdba"
+blue = "#78a9ff"
+magenta = "#be95ff"
+cyan = "#33b1ff"
+white = "#dfdfe0"
+
+[bright]
+black = "#484848"
+red = "#f16da6"
+green = "#46c880"
+yellow = "#2dc7c4"
+blue = "#8cb6ff"
+magenta = "#c8a5ff"
+cyan = "#52bdff"
+white = "#e4e4e5"
+
+[dim]
+black = "#222222"
+red = "#ca4780"
+green = "#1fa25a"
+yellow = "#07a19e"
+blue = "#6690d9"
+magenta = "#a27fd9"
+cyan = "#2b96d9"
+white = "#bebebe"
+
+[[indexed_colors]]
+index = 16
+color = "#3ddbd9"
+
+[[indexed_colors]]
+index = 17
+color = "#ff7eb6"