diff --git a/config/default.nix b/config/default.nix index 494f3831..f9c47841 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,7 +1,6 @@ { config, pkgs, - lib, ... }: { imports = [ @@ -21,6 +20,7 @@ services.openssh.enable = true; environment.systemPackages = with pkgs; [ git + kitty.terminfo ]; networking.firewall.allowedTCPPorts = [22]; networking.firewall.allowedUDPPortRanges = [ diff --git a/config/home-manager/base.nix b/config/home-manager/base.nix index dc2082a8..813e21c4 100644 --- a/config/home-manager/base.nix +++ b/config/home-manager/base.nix @@ -20,6 +20,11 @@ desktop: {pkgs, ...}: { initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; initExtra = '' [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + test -n "$KITTY_INSTALLATION_DIR" || export KITTY_INSTALLATION_DIR=${pkgs.kitty}/lib/kitty + export KITTY_SHELL_INTEGRATION=enabled + autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration + kitty-integration + unfunction kitty-integration ''; plugins = [ ]; @@ -31,15 +36,26 @@ desktop: {pkgs, ...}: { home.file.".p10k.zsh".source = ./.p10k.zsh; systemd.user.sessionVariables = { - EDITOR = "vim"; + EDITOR = "nvim"; }; home = { - shellAliases = { - vi = "nvim"; - vim = "nvim"; - cat = "bat"; - less = "bat"; - }; + shellAliases = + { + hx = "nvim"; + vi = "nvim"; + vim = "nvim"; + cat = "bat"; + less = "bat"; + } + // ( + if desktop + then { + icat = "${pkgs.kitty}/bin/kitty +kitten icat"; + d = "${pkgs.kitty}/bin/kitty +kitten diff"; + hg = "${pkgs.kitty}/bin/kitty +kitten hyperlinked_grep"; + } + else {} + ); packages = with pkgs; [ yubico-piv-tool diff --git a/config/home-manager/darkkirb.nix b/config/home-manager/darkkirb.nix index c9802eaa..6ca8674a 100644 --- a/config/home-manager/darkkirb.nix +++ b/config/home-manager/darkkirb.nix @@ -28,6 +28,7 @@ ../programs/keepass.nix ../programs/kicad.nix ../programs/misc.nix + ../programs/kitty.nix ../programs/zk.nix ] else [] diff --git a/config/programs/foot.nix b/config/programs/foot.nix deleted file mode 100644 index fb1c0e8f..00000000 --- a/config/programs/foot.nix +++ /dev/null @@ -1,13 +0,0 @@ -{...}: { - programs.foot = { - enable = true; - server.enable = true; - settings = { - main = { - term = "xterm-256color"; - font = "FiraCode Nerd Font:size=8"; - dpi-aware = "no"; - }; - }; - }; -} diff --git a/config/programs/kitty.nix b/config/programs/kitty.nix new file mode 100644 index 00000000..814e7270 --- /dev/null +++ b/config/programs/kitty.nix @@ -0,0 +1,14 @@ +_: { + programs.kitty = { + enable = true; + font.name = "FiraCode Nerd Font Mono"; + settings = { + disable_ligatures = "cursor"; + shell_integration = "disabled"; + }; + extraConfig = '' + symbol_map U+F1900-U+F19FF Fairfax HD + narrow_symbols U+F1900-U+F19FF 2 + ''; + }; +} diff --git a/config/programs/rofi.nix b/config/programs/rofi.nix index 7268b51f..cf75bddd 100644 --- a/config/programs/rofi.nix +++ b/config/programs/rofi.nix @@ -6,6 +6,6 @@ display-drun = "  Apps "; display-run = "  Run "; }; - terminal = "${pkgs.foot}/bin/foot"; + terminal = "${pkgs.kitty}/bin/kitty"; }; } diff --git a/config/programs/sway.nix b/config/programs/sway.nix index 6da35a53..e179f778 100644 --- a/config/programs/sway.nix +++ b/config/programs/sway.nix @@ -54,7 +54,6 @@ in { ./wl-clipboard.nix ./mako.nix ./swayidle.nix - ./foot.nix ./rofi.nix ]; wayland.windowManager.sway = { @@ -90,7 +89,7 @@ in { inherit (config.wayland.windowManager.sway.config) modifier; in lib.mkOptionDefault { - "${modifier}+Return" = "exec ${pkgs.foot}/bin/foot"; + "${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty"; "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun"; "Print" = "mode screenshot"; "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; diff --git a/config/programs/theming.nix b/config/programs/theming.nix index 235b1807..3d261507 100644 --- a/config/programs/theming.nix +++ b/config/programs/theming.nix @@ -51,6 +51,29 @@ in { Inherits=Vanilla-DMZ ''; }; + programs.kitty.settings = with theme; { + background_opacity = "0.9"; + background = cssColor base; + foreground = cssColor text; + cursor = cssColor text; + selection_background = "#4f414c"; + color0 = cssColor surface1; + color1 = cssColor red; + color2 = cssColor green; + color3 = cssColor yellow; + color4 = cssColor blue; + color5 = cssColor pink; + color6 = cssColor teal; + color7 = cssColor subtext1; + color8 = cssColor surface2; + color9 = cssColor red; + color10 = cssColor green; + color11 = cssColor yellow; + color12 = cssColor blue; + color13 = cssColor pink; + color14 = cssColor teal; + color15 = cssColor subtext0; + }; # Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css programs.waybar.style = with theme; '' * { @@ -202,28 +225,6 @@ in { ''; home.packages = with pkgs; [libsForQt5.breeze-icons libsForQt5.qt5ct vanilla-dmz]; - programs.foot.settings.colors = with theme; { - alpha = 0.9; - background = base; - foreground = text; - regular0 = surface1; - regular1 = red; - regular2 = green; - regular3 = yellow; - regular4 = blue; - regular5 = pink; - regular6 = teal; - regular7 = subtext1; - bright0 = surface2; - bright1 = red; - bright2 = green; - bright3 = yellow; - bright4 = blue; - bright5 = pink; - bright6 = teal; - bright7 = subtext0; - }; - programs.rofi.theme = with theme; let element = { background-color = mkLiteral "inherit"; diff --git a/config/programs/waybar.nix b/config/programs/waybar.nix index a9759ff6..f50e1c99 100644 --- a/config/programs/waybar.nix +++ b/config/programs/waybar.nix @@ -59,7 +59,7 @@ tooltip-format = "MPD (connected)"; tooltip-format-disconnected = "MPD (disconnected)"; on-click = "${pkgs.mpc-cli}/bin/mpc toggle"; - on-click-middle = "${pkgs.foot}/bin/foot ${pkgs.ncmpcpp}/bin/ncmpcpp"; + on-click-middle = "${pkgs.kitty}/bin/kitty ${pkgs.ncmpcpp}/bin/ncmpcpp"; on-click-right = "${pkgs.mpc-cli}/bin/mpc stop"; on-scroll-up = "${pkgs.mpc-cli}/bin/mpc seekthrough +00:00:01"; on-scroll-down = "${pkgs.mpc-cli}/bin/mpc seekthrough -00:00:01"; diff --git a/flake.lock b/flake.lock index ef50f499..8c530bda 100644 --- a/flake.lock +++ b/flake.lock @@ -209,7 +209,9 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay" + "rust-overlay": [ + "rust-overlay" + ] }, "locked": { "lastModified": 1678614024, @@ -239,7 +241,7 @@ "nixos-config-for-netboot", "nixpkgs" ], - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay" }, "locked": { "lastModified": 1678614024, @@ -332,7 +334,7 @@ "attic", "nixpkgs" ], - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1677892403, @@ -1354,7 +1356,7 @@ "nixpkgs-noto-variable": "nixpkgs-noto-variable", "nur": "nur", "prismmc": "prismmc", - "rust-overlay": "rust-overlay_4", + "rust-overlay": "rust-overlay_3", "sops-nix": "sops-nix", "tomlplusplus": "tomlplusplus" }, @@ -1799,7 +1801,7 @@ "nixpkgs-noto-variable": "nixpkgs-noto-variable_2", "nur": "nur_2", "prismmc": "prismmc_2", - "rust-overlay": "rust-overlay_5", + "rust-overlay": "rust-overlay_4", "sops-nix": "sops-nix_2", "tomlplusplus": "tomlplusplus_2" } @@ -1807,10 +1809,12 @@ "rust-overlay": { "inputs": { "flake-utils": [ + "nixos-config-for-netboot", "chir-rs", "flake-utils" ], "nixpkgs": [ + "nixos-config-for-netboot", "chir-rs", "nixpkgs" ] @@ -1830,33 +1834,6 @@ } }, "rust-overlay_2": { - "inputs": { - "flake-utils": [ - "nixos-config-for-netboot", - "chir-rs", - "flake-utils" - ], - "nixpkgs": [ - "nixos-config-for-netboot", - "chir-rs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1678242776, - "narHash": "sha256-36K1Rg2vM+NLqORSBL4e3aZHmgkb6aS9upHsuG4Akns=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "ea311f10a5d51e7588799281bab0556b4e978d00", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_3": { "inputs": { "flake-utils": [ "nixos-config-for-netboot", @@ -1887,7 +1864,7 @@ "type": "github" } }, - "rust-overlay_4": { + "rust-overlay_3": { "inputs": { "flake-utils": [ "nixos-config-for-netboot", @@ -1912,7 +1889,7 @@ "type": "github" } }, - "rust-overlay_5": { + "rust-overlay_4": { "inputs": { "flake-utils": [ "flake-utils" @@ -1922,11 +1899,11 @@ ] }, "locked": { - "lastModified": 1681525152, - "narHash": "sha256-KzI+ILcmU03iFWtB+ysPqtNmp8TP8v1BBReTuPP8MJY=", + "lastModified": 1681611682, + "narHash": "sha256-gT4wfOdVyxtB3NV5U914uAOqzFYMdNK8ObPmtqHxlUg=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b6f8d87208336d7cb85003b2e439fc707c38f92a", + "rev": "18cdcb7b4017f266117a4d164f9d71c0535ef5ec", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9dc91584..856a00c0 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ rec { inputs.cargo2nix.follows = "cargo2nix"; inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.rust-overlay.follows = "rust-overlay"; }; crane = { url = "github:DarkKirb/crane";