From a1ee1e396c83013454234ca3f34f23f10d513470 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 28 Nov 2021 12:51:40 +0000 Subject: [PATCH] ops/nixos: alacritty -> kitty --- nix/pkgs/default.nix | 7 +++ ops/nixos/lib/home-manager/common.nix | 2 +- .../home-manager/graphical-client-wayland.nix | 4 +- .../lib/home-manager/graphical-client-x11.nix | 2 +- .../lib/home-manager/graphical-client.nix | 56 ++++--------------- 5 files changed, 20 insertions(+), 51 deletions(-) diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index a01403cb55..5ab94d0eec 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -50,5 +50,12 @@ }; gimp-plugin-vtf = pkgs.callPackage ./gimp-plugin-vtf {}; + + kitty-themes = pkgs.fetchFromGitHub { + owner = "kovidgoyal"; + repo = "kitty-themes"; + rev = "702dbae791c9c0812c8fc4a7ee85c99dadc0dc3d"; + sha256 = "18miswrdy3j2y59alqcw44pc2iv3kmsx7qmvak81z5bkmj2hjrss"; + }; } // (import ./heptapod-runner.nix args) // (import ./lightspeed args) diff --git a/ops/nixos/lib/home-manager/common.nix b/ops/nixos/lib/home-manager/common.nix index e9b042538b..9a1f8721f4 100644 --- a/ops/nixos/lib/home-manager/common.nix +++ b/ops/nixos/lib/home-manager/common.nix @@ -124,7 +124,7 @@ in exec "${home-manager}/bin/home-manager" -f "${config.home.homeDirectory}/depot/home-manager-ext.nix" -A "${configName}" "$@" '') rxvt_unicode.terminfo tmux rsync libarchive tcpdump restic - alacritty.terminfo + alacritty.terminfo kitty.terminfo iftop htop jq depot.nix.pkgs.mercurial ] ++ lib.optionals isLinux [ diff --git a/ops/nixos/lib/home-manager/graphical-client-wayland.nix b/ops/nixos/lib/home-manager/graphical-client-wayland.nix index 1f5bdf5b78..b634b7ed13 100644 --- a/ops/nixos/lib/home-manager/graphical-client-wayland.nix +++ b/ops/nixos/lib/home-manager/graphical-client-wayland.nix @@ -31,7 +31,7 @@ in lib.mkOptionDefault { "${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock"; "${modifier}+p" = "exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui"; - "${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; + "${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty"; }; startup = [ { command = "${pkgs._1password-gui}/bin/1password --silent"; } @@ -47,6 +47,4 @@ }; }; }; - - my.alacritty.fontSize = 12; } diff --git a/ops/nixos/lib/home-manager/graphical-client-x11.nix b/ops/nixos/lib/home-manager/graphical-client-x11.nix index 3b65c8fe25..6fe2eb3caa 100644 --- a/ops/nixos/lib/home-manager/graphical-client-x11.nix +++ b/ops/nixos/lib/home-manager/graphical-client-x11.nix @@ -11,7 +11,7 @@ in lib.mkOptionDefault { "${modifier}+l" = "exec loginctl lock-session"; "${modifier}+p" = "exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui"; - "${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; + "${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty"; }; startup = [ { command = "xss-lock --transfer-sleep-lock -- i3lock --nofork"; notification = false; } diff --git a/ops/nixos/lib/home-manager/graphical-client.nix b/ops/nixos/lib/home-manager/graphical-client.nix index 96ec5a4e8d..deda8b0973 100644 --- a/ops/nixos/lib/home-manager/graphical-client.nix +++ b/ops/nixos/lib/home-manager/graphical-client.nix @@ -2,13 +2,6 @@ { imports = [ ./client.nix ]; - options.my.alacritty = with lib; { - fontSize = mkOption { - default = 6; - type = types.int; - }; - }; - config = { gtk = { enable = true; @@ -39,48 +32,19 @@ _1password-gui ]); - programs.alacritty = { + programs.kitty = { enable = true; - settings.font = let - iosevka = style: { family = "Iosevka"; inherit style; }; - in { - normal = iosevka "Regular"; - bold = iosevka "Bold"; - italic = iosevka "Italic"; - bold_italic = iosevka "Bold Italic"; - size = config.my.alacritty.fontSize; + font = { + package = depot.pkgs.iosevka; + name = "Iosevka"; }; - settings.colors = { - # Ayu Dark, from https://github.com/alacritty/alacritty/wiki/Color-schemes - primary = { - background = "#0A0E14"; - foreground = "#B3B1AD"; - }; + extraConfig = '' - # Normal colors - normal = { - black = "#01060E"; - red = "#EA6C73"; - green = "#91B362"; - yellow = "#F9AF4F"; - blue = "#53BDFA"; - magenta = "#FAE994"; - cyan = "#90E1C6"; - white = "#C7C7C7"; - }; - - # Bright colors - bright = { - black = "#686868"; - red = "#F07178"; - green = "#C2D94C"; - yellow = "#FFB454"; - blue = "#59C2FF"; - magenta = "#FFEE99"; - cyan = "#95E6CB"; - white = "#FFFFFF"; - }; - }; + # BEGIN_KITTY_THEME + # Tango Dark + include ${depot.pkgs.kitty-themes}/themes/Tango_Dark.conf + # END_KITTY_THEME + ''; }; home.file."bin/screencap" = {