summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-27 00:08:44 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-27 00:08:44 -0400
commit22924de88274e192df0970f70ec631660583bf17 (patch)
treef6b10e8e0dcde52f14d81fc98e3ccf9b75b332a1
parentalways use dbus broker (diff)
downloaddotfiles-nix-22924de88274e192df0970f70ec631660583bf17.tar.gz
dotfiles-nix-22924de88274e192df0970f70ec631660583bf17.tar.bz2
dotfiles-nix-22924de88274e192df0970f70ec631660583bf17.zip
add alacritty
-rw-r--r--modules/terminal/alacritty.nix74
-rw-r--r--modules/terminal/default.nix2
2 files changed, 76 insertions, 0 deletions
diff --git a/modules/terminal/alacritty.nix b/modules/terminal/alacritty.nix
new file mode 100644
index 0000000..7dd4456
--- /dev/null
+++ b/modules/terminal/alacritty.nix
@@ -0,0 +1,74 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.terminal;
+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 =
+ (lib.attrsets.mapAttrs (
+ group: colors:
+ lib.attrsets.mapAttrs (name: color: "#${color}") colors
+ ) {inherit (config.theme.colors) bright normal;})
+ // {
+ cursor = {
+ background = "CellForeground";
+ text = "CellBackground";
+ };
+ selection = {
+ background = "CellForeground";
+ text = "CellBackground";
+ };
+ primary = {
+ foreground = "#${config.theme.colors.fg}";
+ background = "#${config.theme.colors.bg}";
+ };
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix
index 8e9d5f8..8d97a01 100644
--- a/modules/terminal/default.nix
+++ b/modules/terminal/default.nix
@@ -6,10 +6,12 @@
inherit (lib) mkEnableOption;
in {
imports = [
+ ./alacritty.nix
./kitty.nix
];
options.terminal = {
+ alacritty = mkEnableOption "Enable the alacritty terminal.";
kitty = mkEnableOption "Enable the kitty terminal.";
};
}