From 83c2b015708572ed2a1a0f2a57a645c50ab1bbf2 Mon Sep 17 00:00:00 2001 From: htran Date: Thu, 22 Jun 2023 20:52:40 -0700 Subject: [PATCH] ^std breaking change --- .envrc | 23 +- flake.lock | 357 ++--------- flake.nix | 5 +- native_configs/alacritty/alacritty.yml | 841 +++++++++++++------------ native_configs/kitty/kitty.conf | 85 +++ nix/repo/home-configs/default.nix | 1 + nix/repo/home-modules/default.nix | 42 ++ nix/repo/home-profiles/default.nix | 19 +- 8 files changed, 644 insertions(+), 729 deletions(-) create mode 100644 native_configs/kitty/kitty.conf diff --git a/.envrc b/.envrc index 2b67239..c89cabf 100644 --- a/.envrc +++ b/.envrc @@ -1,16 +1,13 @@ -#! /bin/sh +#!/bin/sh -source "$( - nix eval \ - --no-update-lock-file \ - --no-write-lock-file \ - --no-warn-dirty \ - --accept-flake-config \ - .#__std.direnv_lib 2>/dev/null \ - || nix eval .#__std.direnv_lib # show the errors -)" -# FIXME: This should check if $USER is in userShells, if not, -# fall back to `use nix` -use std nix "//repo/userShells:${USER}" +# first time +if [[ ! -d $(nix store add-path --name source --dry-run .) ]]; then + nix store add-path --name source . + (cd ./src/local && nix flake lock --update-input std) + (cd ./src/tests && nix flake lock --update-input std) +fi +# shellcheck disable=SC1090 +. "$(fetchurl "https://raw.githubusercontent.com/paisano-nix/direnv/main/lib" "sha256-R3K8Flvbovj4IOvdlWNtQKLMMSQV464WjG9eU29ixHk=")" +use envreload "//repo/userShells/${USER}" //repo/userShells/default //repo/userShells diff --git a/flake.lock b/flake.lock index af8cce4..6d6a09a 100644 --- a/flake.lock +++ b/flake.lock @@ -30,6 +30,21 @@ "type": "github" } }, + "call-flake": { + "locked": { + "lastModified": 1687380775, + "narHash": "sha256-bmhE1TmrJG4ba93l9WQTLuYM53kwGQAjYHRvHOeuxWU=", + "owner": "divnix", + "repo": "call-flake", + "rev": "74061f6c241227cd05e79b702db9a300a2e4131a", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "call-flake", + "type": "github" + } + }, "cargo-leptos": { "flake": false, "locked": { @@ -114,31 +129,6 @@ "type": "github" } }, - "crane_4": { - "inputs": { - "flake-compat": "flake-compat_8", - "flake-utils": "flake-utils_12", - "nixpkgs": [ - "std", - "paisano-mdbook-preprocessor", - "nixpkgs" - ], - "rust-overlay": "rust-overlay_6" - }, - "locked": { - "lastModified": 1676162383, - "narHash": "sha256-krUCKdz7ebHlFYm/A7IbKDnj2ZmMMm3yIEQcooqm7+E=", - "owner": "ipetkov", - "repo": "crane", - "rev": "6fb400ec631b22ccdbc7090b38207f7fb5cfb5f2", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "devshell": { "inputs": { "nixpkgs": [ @@ -164,18 +154,15 @@ }, "devshell_2": { "inputs": { - "nixpkgs": [ - "std", - "nixpkgs" - ], + "nixpkgs": "nixpkgs_14", "systems": "systems_8" }, "locked": { - "lastModified": 1686680692, - "narHash": "sha256-SsLZz3TDleraAiJq4EkmdyewSyiv5g0LZYc6vaLZOMQ=", + "lastModified": 1687173957, + "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", "owner": "numtide", "repo": "devshell", - "rev": "fd6223370774dd9c33354e87a007004b5fd36442", + "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", "type": "github" }, "original": { @@ -268,25 +255,6 @@ "type": "github" } }, - "fenix_2": { - "inputs": { - "nixpkgs": "nixpkgs_16", - "rust-analyzer-src": "rust-analyzer-src_2" - }, - "locked": { - "lastModified": 1677306201, - "narHash": "sha256-VZ9x7qdTosFvVsrpgFHrtYfT6PU3yMIs7NRYn9ELapI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "0923f0c162f65ae40261ec940406049726cfeab4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -399,22 +367,6 @@ "type": "github" } }, - "flake-compat_8": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -527,36 +479,6 @@ "type": "github" } }, - "flake-utils_11": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_12": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flake-utils_2": { "locked": { "lastModified": 1667395993, @@ -810,7 +732,7 @@ }, "haumea_2": { "inputs": { - "nixpkgs": "nixpkgs_14" + "nixpkgs": "nixpkgs_15" }, "locked": { "lastModified": 1685133229, @@ -878,11 +800,11 @@ ] }, "locked": { - "lastModified": 1687365523, - "narHash": "sha256-2l/cPXDCDVcLNm+EvCRGJcJ9YxxyLbc2vfTah/t8Qwc=", + "lastModified": 1687473300, + "narHash": "sha256-4LflQpktYFiub8xVhEN9EZf1cYsr09md01rBJZRCGCc=", "owner": "nix-community", "repo": "home-manager", - "rev": "1fefd7bb8da0eec6755747f410fa491411a94296", + "rev": "70ac18872a5f1a57a4546ff58888bf67a8bbb5b3", "type": "github" }, "original": { @@ -979,31 +901,6 @@ "type": "github" } }, - "n2c_2": { - "inputs": { - "flake-utils": [ - "std", - "flake-utils" - ], - "nixpkgs": [ - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1685771919, - "narHash": "sha256-3lVKWrhNXjHJB6QkZ2SJaOs4X/mmYXtY6ovPVpDMOHc=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "95e2220911874064b5d809f8d35f7835184c4ddf", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, "neovim-flake": { "inputs": { "flake-utils": "flake-utils_2", @@ -1155,35 +1052,6 @@ "type": "github" } }, - "nixago_2": { - "inputs": { - "flake-utils": [ - "std", - "flake-utils" - ], - "nixago-exts": [ - "std", - "blank" - ], - "nixpkgs": [ - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1683210100, - "narHash": "sha256-bhGDOlkWtlhVECpoOog4fWiFJmLCpVEg09a40aTjCbw=", - "owner": "nix-community", - "repo": "nixago", - "rev": "1da60ad9412135f9ed7a004669fdcf3d378ec630", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixago", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1678293141, @@ -1202,11 +1070,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1687412861, - "narHash": "sha256-Z/g0wbL68C+mSGerYS2quv9FXQ1RRP082cAC0Bh4vcs=", + "lastModified": 1687489195, + "narHash": "sha256-+cRlLajJaBn1UwBShbJ7C0SFSfyeMiUH94nRUGWOp4k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc", + "rev": "86a9533155ed8a204f9920a9b253c6cc070eab03", "type": "github" }, "original": { @@ -1348,6 +1216,22 @@ } }, "nixpkgs_14": { + "locked": { + "lastModified": 1677383253, + "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9952d6bc395f5841262b006fbace8dd7e143b634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { "locked": { "lastModified": 1681001314, "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", @@ -1362,7 +1246,7 @@ "type": "github" } }, - "nixpkgs_15": { + "nixpkgs_16": { "locked": { "lastModified": 1675940568, "narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=", @@ -1378,22 +1262,6 @@ "type": "github" } }, - "nixpkgs_16": { - "locked": { - "lastModified": 1677063315, - "narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "988cc958c57ce4350ec248d2d53087777f9e1949", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1685714850, @@ -1507,11 +1375,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1686960236, - "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=", + "lastModified": 1687412861, + "narHash": "sha256-Z/g0wbL68C+mSGerYS2quv9FXQ1RRP082cAC0Bh4vcs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86", + "rev": "e603dc5f061ca1d8a19b3ede6a8cf9c9fcba6cdc", "type": "github" }, "original": { @@ -1603,28 +1471,6 @@ "type": "github" } }, - "paisano-actions_2": { - "inputs": { - "nixpkgs": [ - "std", - "paisano-mdbook-preprocessor", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1677306424, - "narHash": "sha256-H9/dI2rGEbKo4KEisqbRPHFG2ajF8Tm111NPdKGIf28=", - "owner": "paisano-nix", - "repo": "actions", - "rev": "65ec4e080b3480167fc1a748c89a05901eea9a9b", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "actions", - "type": "github" - } - }, "paisano-mdbook-preprocessor": { "inputs": { "crane": "crane_2", @@ -1654,33 +1500,6 @@ "type": "github" } }, - "paisano-mdbook-preprocessor_2": { - "inputs": { - "crane": "crane_4", - "fenix": "fenix_2", - "nixpkgs": [ - "std", - "nixpkgs" - ], - "paisano-actions": "paisano-actions_2", - "std": [ - "std" - ] - }, - "locked": { - "lastModified": 1680654400, - "narHash": "sha256-Qdpio+ldhUK3zfl22Mhf8HUULdUOJXDWDdO7MIK69OU=", - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "rev": "11a8fc47f574f194a7ae7b8b98001f6143ba4cf1", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "type": "github" - } - }, "paisano-tui": { "inputs": { "nixpkgs": [ @@ -1709,15 +1528,7 @@ } }, "paisano-tui_2": { - "inputs": { - "nixpkgs": [ - "std", - "blank" - ], - "std": [ - "std" - ] - }, + "flake": false, "locked": { "lastModified": 1681847764, "narHash": "sha256-mdd7PJW1BZvxy0cIKsPfAO+ohVl/V7heE5ZTAHzTdv8=", @@ -1735,6 +1546,7 @@ }, "paisano_2": { "inputs": { + "call-flake": "call-flake", "nixpkgs": [ "std", "nixpkgs" @@ -1746,16 +1558,15 @@ ] }, "locked": { - "lastModified": 1686862844, - "narHash": "sha256-m8l/HpRBJnZ3c0F1u0IyQ3nYGWE0R9V5kfORuqZPzgk=", + "lastModified": 1687475968, + "narHash": "sha256-tFrPoD24Ph6VZjgmL3J4ICDWY6W/DnnHyupWeAL3Lw8=", "owner": "paisano-nix", "repo": "core", - "rev": "6674b3d3577212c1eeecd30d62d52edbd000e726", + "rev": "9954e48e1ebc74a698b9d4ac02aee85514fc0237", "type": "github" }, "original": { "owner": "paisano-nix", - "ref": "0.1.1", "repo": "core", "type": "github" } @@ -1861,23 +1672,6 @@ "type": "github" } }, - "rust-analyzer-src_2": { - "flake": false, - "locked": { - "lastModified": 1677221702, - "narHash": "sha256-1M+58rC4eTCWNmmX0hQVZP20t3tfYNunl9D/PrGUyGE=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "f5401f620699b26ed9d47a1d2e838143a18dbe3b", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "flake-utils": [ @@ -2001,35 +1795,6 @@ "type": "github" } }, - "rust-overlay_6": { - "inputs": { - "flake-utils": [ - "std", - "paisano-mdbook-preprocessor", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "std", - "paisano-mdbook-preprocessor", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1675391458, - "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "sg-nvim": { "inputs": { "crane": "crane_3", @@ -2107,7 +1872,6 @@ "blank": "blank_2", "devshell": "devshell_2", "dmerge": "dmerge_2", - "flake-utils": "flake-utils_11", "haumea": "haumea_2", "incl": "incl_2", "makes": [ @@ -2118,20 +1882,25 @@ "std", "blank" ], - "n2c": "n2c_2", - "nixago": "nixago_2", - "nixpkgs": "nixpkgs_15", + "n2c": [ + "std", + "blank" + ], + "nixago": [ + "std", + "blank" + ], + "nixpkgs": "nixpkgs_16", "paisano": "paisano_2", - "paisano-mdbook-preprocessor": "paisano-mdbook-preprocessor_2", "paisano-tui": "paisano-tui_2", "yants": "yants_2" }, "locked": { - "lastModified": 1687300684, - "narHash": "sha256-oBqbss0j+B568GoO3nF2BCoPEgPxUjxfZQGynW6mhEk=", + "lastModified": 1687482460, + "narHash": "sha256-KSut2GPMR//LJ62cMpHk+b8AHlDHWaSHTxCABzLY2yM=", "owner": "divnix", "repo": "std", - "rev": "80e5792eae98353a97ab1e85f3fba2784e4a3690", + "rev": "1dfd574de0d2e3011d8df7ade3a3f2748b701a6d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 50bfe04..aca3313 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,10 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-latest.url = "github:nixos/nixpkgs"; # deploy-rs.url = "github:serokell/deploy-rs"; - std.url = "github:divnix/std"; + std = { + url = "github:divnix/std"; + inputs.devshell.url = "github:numtide/devshell"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/native_configs/alacritty/alacritty.yml b/native_configs/alacritty/alacritty.yml index 773f376..57c2f7c 100755 --- a/native_configs/alacritty/alacritty.yml +++ b/native_configs/alacritty/alacritty.yml @@ -15,99 +15,99 @@ # environment variables. Some entries may override variables # set by alacritty itself. #env: - # TERM variable - # - # This value is used to set the `$TERM` environment variable for - # each instance of Alacritty. If it is not present, alacritty will - # check the local terminfo database and use `alacritty` if it is - # available, otherwise `xterm-256color` is used. - #TERM: alacritty +# TERM variable +# +# This value is used to set the `$TERM` environment variable for +# each instance of Alacritty. If it is not present, alacritty will +# check the local terminfo database and use `alacritty` if it is +# available, otherwise `xterm-256color` is used. +#TERM: alacritty #window: - # Window dimensions (changes require restart) - # - # Number of lines/columns (not pixels) in the terminal. Both lines and columns - # must be non-zero for this to take effect. The number of columns must be at - # least `2`, while using a value of `0` for columns and lines will fall back - # to the window manager's recommended size - #dimensions: - # columns: 0 - # lines: 0 +# Window dimensions (changes require restart) +# +# Number of lines/columns (not pixels) in the terminal. Both lines and columns +# must be non-zero for this to take effect. The number of columns must be at +# least `2`, while using a value of `0` for columns and lines will fall back +# to the window manager's recommended size +#dimensions: +# columns: 0 +# lines: 0 - # Window position (changes require restart) - # - # Specified in number of pixels. - # If the position is not set, the window manager will handle the placement. - #position: - # x: 0 - # y: 0 +# Window position (changes require restart) +# +# Specified in number of pixels. +# If the position is not set, the window manager will handle the placement. +#position: +# x: 0 +# y: 0 - # Window padding (changes require restart) - # - # Blank space added around the window in pixels. This padding is scaled - # by DPI and the specified value is always added at both opposing sides. - #padding: - # x: 0 - # y: 0 +# Window padding (changes require restart) +# +# Blank space added around the window in pixels. This padding is scaled +# by DPI and the specified value is always added at both opposing sides. +#padding: +# x: 0 +# y: 0 - # Spread additional padding evenly around the terminal content. - #dynamic_padding: false +# Spread additional padding evenly around the terminal content. +#dynamic_padding: false - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - # Values for `decorations` (macOS only): - # - transparent: Title bar, transparent background and title bar buttons - # - buttonless: Title bar, transparent background and no title bar buttons - #decorations: full +# Window decorations +# +# Values for `decorations`: +# - full: Borders and title bar +# - none: Neither borders nor title bar +# +# Values for `decorations` (macOS only): +# - transparent: Title bar, transparent background and title bar buttons +# - buttonless: Title bar, transparent background and no title bar buttons +#decorations: full - # Background opacity - # - # Window opacity as a floating point number from `0.0` to `1.0`. - # The value `0.0` is completely transparent and `1.0` is opaque. - #opacity: 1.0 +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. +#opacity: 1.0 - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - # Values for `startup_mode` (macOS only): - # - SimpleFullscreen - #startup_mode: Windowed +# Startup Mode (changes require restart) +# +# Values for `startup_mode`: +# - Windowed +# - Maximized +# - Fullscreen +# +# Values for `startup_mode` (macOS only): +# - SimpleFullscreen +#startup_mode: Windowed - # Window title - #title: Alacritty +# Window title +#title: Alacritty - # Allow terminal applications to change Alacritty's window title. - #dynamic_title: true +# Allow terminal applications to change Alacritty's window title. +#dynamic_title: true - # Window class (Linux/BSD only): - #class: - # Application instance name - #instance: Alacritty - # General application class - #general: Alacritty +# Window class (Linux/BSD only): +#class: +# Application instance name +#instance: Alacritty +# General application class +#general: Alacritty - # Decorations theme variant (Linux/BSD only) - # - # Override the variant of the GTK theme/Wayland client side decorations. - # Commonly supported values are `dark` and `light`. Set this to `None` to use - # the default theme variant. - #decorations_theme_variant: None +# Decorations theme variant (Linux/BSD only) +# +# Override the variant of the GTK theme/Wayland client side decorations. +# Commonly supported values are `dark` and `light`. Set this to `None` to use +# the default theme variant. +#decorations_theme_variant: None #scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - #history: 10000 +# Maximum number of lines in the scrollback buffer. +# Specifying '0' will disable scrolling. +#history: 10000 - # Scrolling distance multiplier. - #multiplier: 3 +# Scrolling distance multiplier. +#multiplier: 3 # Font configuration font: @@ -120,12 +120,11 @@ font: # - (Linux/BSD) monospace # - (Windows) Consolas family: DroidSansMono NF - # The `style` can be specified to pick a specific face. #style: Regular - # Bold font face - #bold: + # Bold font face + #bold: # Font family # # If the bold family is not specified, it will fall back to the @@ -135,8 +134,8 @@ font: # The `style` can be specified to pick a specific face. #style: Bold - # Italic font face - #italic: + # Italic font face + #italic: # Font family # # If the italic family is not specified, it will fall back to the @@ -146,8 +145,8 @@ font: # The `style` can be specified to pick a specific face. #style: Italic - # Bold italic font face - #bold_italic: + # Bold italic font face + #bold_italic: # Font family # # If the bold italic family is not specified, it will fall back to the @@ -157,9 +156,8 @@ font: # The `style` can be specified to pick a specific face. #style: Bold Italic - # Point size + # Point size size: 7.0 - # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter # spacing. @@ -181,24 +179,24 @@ font: # #builtin_box_drawing: true -# If `true`, bold text is drawn using the bright color variants. -#draw_bold_text_with_bright_colors: false + # If `true`, bold text is drawn using the bright color variants. + #draw_bold_text_with_bright_colors: false -# Colors (Tomorrow Night) -#colors: + # Colors (Tomorrow Night) + #colors: # Default colors #primary: # background: '#1d1f21' # foreground: '#c5c8c6' - # Bright and dim foreground colors - # - # The dimmed foreground color is calculated automatically if it is not - # present. If the bright foreground color is not set, or - # `draw_bold_text_with_bright_colors` is `false`, the normal foreground - # color will be used. - #dim_foreground: '#828482' - #bright_foreground: '#eaeaea' + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not + # present. If the bright foreground color is not set, or + # `draw_bold_text_with_bright_colors` is `false`, the normal foreground + # color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' # Cursor colors # @@ -224,32 +222,32 @@ font: # # Colors used for the search bar and match highlighting. #search: - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #matches: - # foreground: '#000000' - # background: '#ffffff' - #focused_match: - # foreground: '#ffffff' - # background: '#000000' + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + #focused_match: + # foreground: '#ffffff' + # background: '#000000' # Keyboard hints #hints: - # First character in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #start: - # foreground: '#1d1f21' - # background: '#e9ff5e' + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' - # All characters after the first one in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #end: - # foreground: '#e9ff5e' - # background: '#1d1f21' + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' # Line indicator # @@ -333,10 +331,10 @@ font: # regardless of their background color. #transparent_background_colors: false -# Bell -# -# The bell is rung every time the BEL control character is received. -#bell: + # Bell + # + # The bell is rung every time the BEL control character is received. + #bell: # Visual Bell Animation # # Animation effect for flashing the screen when the visual bell is rung. @@ -374,7 +372,7 @@ font: # #command: None -#selection: + #selection: # This string contains all characters that are used as separators for # "semantic words" in Alacritty. #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" @@ -382,25 +380,25 @@ font: # When set to `true`, selected text will be copied to the primary clipboard. #save_to_clipboard: false -#cursor: + #cursor: # Cursor style #style: - # Cursor shape - # - # Values for `shape`: - # - ▇ Block - # - _ Underline - # - | Beam - #shape: Block + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + #shape: Block - # Cursor blinking state - # - # Values for `blinking`: - # - Never: Prevent the cursor from ever blinking - # - Off: Disable blinking by default - # - On: Enable blinking by default - # - Always: Force the cursor to always blink - #blinking: Off + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + #blinking: Off # Vi mode cursor style # @@ -426,36 +424,36 @@ font: # from `0.0` to `1.0`. #thickness: 0.15 -# Live config reload (changes require restart) -#live_config_reload: true + # Live config reload (changes require restart) + #live_config_reload: true -# Shell -# -# You can set `shell.program` to the path of your favorite shell, e.g. -# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the -# shell. -# -# Default: -# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset -# - (Windows) powershell -#shell: -# program: /bin/bash -# args: -# - --login + # Shell + # + # You can set `shell.program` to the path of your favorite shell, e.g. + # `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the + # shell. + # + # Default: + # - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset + # - (Windows) powershell + #shell: + # program: /bin/bash + # args: + # - --login -# Startup directory -# -# Directory the shell is started in. If this is unset, or `None`, the working -# directory of the parent process will be used. -#working_directory: None + # Startup directory + # + # Directory the shell is started in. If this is unset, or `None`, the working + # directory of the parent process will be used. + #working_directory: None -# Send ESC (\x1b) before characters when alt is pressed. -#alt_send_esc: true + # Send ESC (\x1b) before characters when alt is pressed. + #alt_send_esc: true -# Offer IPC using `alacritty msg` (unix only) -# ipc_socket: true + # Offer IPC using `alacritty msg` (unix only) + # ipc_socket: true -#mouse: + #mouse: # Click settings # # The `double_click` and `triple_click` settings control the time @@ -467,11 +465,11 @@ font: # If this is `true`, the cursor is temporarily hidden when typing. #hide_when_typing: false -# Hints -# -# Terminal hints can be used to find text or hyperlink in the visible part of -# the terminal and pipe it to other applications. -#hints: + # Hints + # + # Terminal hints can be used to find text or hyperlink in the visible part of + # the terminal and pipe it to other applications. + #hints: # Keys used for the hint labels. #alphabet: "jfkdls;ahgurieowpq" @@ -517,247 +515,247 @@ font: # key: U # mods: Control|Shift -# Mouse bindings -# -# Mouse bindings are specified as a list of objects, much like the key -# bindings further below. -# -# To trigger mouse bindings when an application running within Alacritty -# captures the mouse, the `Shift` modifier is automatically added as a -# requirement. -# -# Each mouse binding will specify a: -# -# - `mouse`: -# -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# - `action` (see key bindings for actions not exclusive to mouse mode) -# -# - Mouse exclusive actions: -# -# - ExpandSelection -# Expand the selection to the current mouse cursor location. -# -# And optionally: -# -# - `mods` (see key bindings) -#mouse_bindings: -# - { mouse: Right, action: ExpandSelection } -# - { mouse: Right, mods: Control, action: ExpandSelection } -# - { mouse: Middle, mode: ~Vi, action: PasteSelection } + # Mouse bindings + # + # Mouse bindings are specified as a list of objects, much like the key + # bindings further below. + # + # To trigger mouse bindings when an application running within Alacritty + # captures the mouse, the `Shift` modifier is automatically added as a + # requirement. + # + # Each mouse binding will specify a: + # + # - `mouse`: + # + # - Middle + # - Left + # - Right + # - Numeric identifier such as `5` + # + # - `action` (see key bindings for actions not exclusive to mouse mode) + # + # - Mouse exclusive actions: + # + # - ExpandSelection + # Expand the selection to the current mouse cursor location. + # + # And optionally: + # + # - `mods` (see key bindings) + #mouse_bindings: + # - { mouse: Right, action: ExpandSelection } + # - { mouse: Right, mods: Control, action: ExpandSelection } + # - { mouse: Middle, mode: ~Vi, action: PasteSelection } -# Key bindings -# -# Key bindings are specified as a list of objects. For example, this is the -# default paste binding: -# -# `- { key: V, mods: Control|Shift, action: Paste }` -# -# Each key binding will specify a: -# -# - `key`: Identifier of the key pressed -# -# - A-Z -# - F1-F24 -# - Key0-Key9 -# -# A full list with available key codes can be found here: -# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants -# -# Instead of using the name of the keys, the `key` field also supports using -# the scancode of the desired key. Scancodes have to be specified as a -# decimal number. This command will allow you to display the hex scancodes -# for certain keys: -# -# `showkey --scancodes`. -# -# Then exactly one of: -# -# - `chars`: Send a byte sequence to the running application -# -# The `chars` field writes the specified string to the terminal. This makes -# it possible to pass escape sequences. To find escape codes for bindings -# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside -# of tmux. Note that applications use terminfo to map escape sequences back -# to keys. It is therefore required to update the terminfo when changing an -# escape sequence. -# -# - `action`: Execute a predefined action -# -# - ToggleViMode -# - SearchForward -# Start searching toward the right of the search origin. -# - SearchBackward -# Start searching toward the left of the search origin. -# - Copy -# - Paste -# - IncreaseFontSize -# - DecreaseFontSize -# - ResetFontSize -# - ScrollPageUp -# - ScrollPageDown -# - ScrollHalfPageUp -# - ScrollHalfPageDown -# - ScrollLineUp -# - ScrollLineDown -# - ScrollToTop -# - ScrollToBottom -# - ClearHistory -# Remove the terminal's scrollback history. -# - Hide -# Hide the Alacritty window. -# - Minimize -# Minimize the Alacritty window. -# - Quit -# Quit Alacritty. -# - ToggleFullscreen -# - SpawnNewInstance -# Spawn a new instance of Alacritty. -# - CreateNewWindow -# Create a new Alacritty window from the current process. -# - ClearLogNotice -# Clear Alacritty's UI warning and error notice. -# - ClearSelection -# Remove the active selection. -# - ReceiveChar -# - None -# -# - Vi mode exclusive actions: -# -# - Open -# Perform the action of the first matching hint under the vi mode cursor -# with `mouse.enabled` set to `true`. -# - ToggleNormalSelection -# - ToggleLineSelection -# - ToggleBlockSelection -# - ToggleSemanticSelection -# Toggle semantic selection based on `selection.semantic_escape_chars`. -# - CenterAroundViCursor -# Center view around vi mode cursor -# -# - Vi mode exclusive cursor motion actions: -# -# - Up -# One line up. -# - Down -# One line down. -# - Left -# One character left. -# - Right -# One character right. -# - First -# First column, or beginning of the line when already at the first column. -# - Last -# Last column, or beginning of the line when already at the last column. -# - FirstOccupied -# First non-empty cell in this terminal row, or first non-empty cell of -# the line when already at the first cell of the row. -# - High -# Top of the screen. -# - Middle -# Center of the screen. -# - Low -# Bottom of the screen. -# - SemanticLeft -# Start of the previous semantically separated word. -# - SemanticRight -# Start of the next semantically separated word. -# - SemanticLeftEnd -# End of the previous semantically separated word. -# - SemanticRightEnd -# End of the next semantically separated word. -# - WordLeft -# Start of the previous whitespace separated word. -# - WordRight -# Start of the next whitespace separated word. -# - WordLeftEnd -# End of the previous whitespace separated word. -# - WordRightEnd -# End of the next whitespace separated word. -# - Bracket -# Character matching the bracket at the cursor's location. -# - SearchNext -# Beginning of the next match. -# - SearchPrevious -# Beginning of the previous match. -# - SearchStart -# Start of the match to the left of the vi mode cursor. -# - SearchEnd -# End of the match to the right of the vi mode cursor. -# -# - Search mode exclusive actions: -# - SearchFocusNext -# Move the focus to the next search match. -# - SearchFocusPrevious -# Move the focus to the previous search match. -# - SearchConfirm -# - SearchCancel -# - SearchClear -# Reset the search regex. -# - SearchDeleteWord -# Delete the last word in the search regex. -# - SearchHistoryPrevious -# Go to the previous regex in the search history. -# - SearchHistoryNext -# Go to the next regex in the search history. -# -# - macOS exclusive actions: -# - ToggleSimpleFullscreen -# Enter fullscreen without occupying another space. -# -# - Linux/BSD exclusive actions: -# -# - CopySelection -# Copy from the selection buffer. -# - PasteSelection -# Paste from the selection buffer. -# -# - `command`: Fork and execute a specified command plus arguments -# -# The `command` field must be a map containing a `program` string and an -# `args` array of command line parameter strings. For example: -# `{ program: "alacritty", args: ["-e", "vttest"] }` -# -# And optionally: -# -# - `mods`: Key modifiers to filter binding actions -# -# - Command -# - Control -# - Option -# - Super -# - Shift -# - Alt -# -# Multiple `mods` can be combined using `|` like this: -# `mods: Control|Shift`. -# Whitespace and capitalization are relevant and must match the example. -# -# - `mode`: Indicate a binding for only specific terminal reported modes -# -# This is mainly used to send applications the correct escape sequences -# when in different modes. -# -# - AppCursor -# - AppKeypad -# - Search -# - Alt -# - Vi -# -# A `~` operator can be used before a mode to apply the binding whenever -# the mode is *not* active, e.g. `~Alt`. -# -# Bindings are always filled by default, but will be replaced when a new -# binding with the same triggers is defined. To unset a default binding, it can -# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for -# a no-op if you do not wish to receive input characters for that binding. -# -# If the same trigger is assigned to multiple actions, all of them are executed -# in the order they were defined in. + # Key bindings + # + # Key bindings are specified as a list of objects. For example, this is the + # default paste binding: + # + # `- { key: V, mods: Control|Shift, action: Paste }` + # + # Each key binding will specify a: + # + # - `key`: Identifier of the key pressed + # + # - A-Z + # - F1-F24 + # - Key0-Key9 + # + # A full list with available key codes can be found here: + # https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants + # + # Instead of using the name of the keys, the `key` field also supports using + # the scancode of the desired key. Scancodes have to be specified as a + # decimal number. This command will allow you to display the hex scancodes + # for certain keys: + # + # `showkey --scancodes`. + # + # Then exactly one of: + # + # - `chars`: Send a byte sequence to the running application + # + # The `chars` field writes the specified string to the terminal. This makes + # it possible to pass escape sequences. To find escape codes for bindings + # like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside + # of tmux. Note that applications use terminfo to map escape sequences back + # to keys. It is therefore required to update the terminfo when changing an + # escape sequence. + # + # - `action`: Execute a predefined action + # + # - ToggleViMode + # - SearchForward + # Start searching toward the right of the search origin. + # - SearchBackward + # Start searching toward the left of the search origin. + # - Copy + # - Paste + # - IncreaseFontSize + # - DecreaseFontSize + # - ResetFontSize + # - ScrollPageUp + # - ScrollPageDown + # - ScrollHalfPageUp + # - ScrollHalfPageDown + # - ScrollLineUp + # - ScrollLineDown + # - ScrollToTop + # - ScrollToBottom + # - ClearHistory + # Remove the terminal's scrollback history. + # - Hide + # Hide the Alacritty window. + # - Minimize + # Minimize the Alacritty window. + # - Quit + # Quit Alacritty. + # - ToggleFullscreen + # - SpawnNewInstance + # Spawn a new instance of Alacritty. + # - CreateNewWindow + # Create a new Alacritty window from the current process. + # - ClearLogNotice + # Clear Alacritty's UI warning and error notice. + # - ClearSelection + # Remove the active selection. + # - ReceiveChar + # - None + # + # - Vi mode exclusive actions: + # + # - Open + # Perform the action of the first matching hint under the vi mode cursor + # with `mouse.enabled` set to `true`. + # - ToggleNormalSelection + # - ToggleLineSelection + # - ToggleBlockSelection + # - ToggleSemanticSelection + # Toggle semantic selection based on `selection.semantic_escape_chars`. + # - CenterAroundViCursor + # Center view around vi mode cursor + # + # - Vi mode exclusive cursor motion actions: + # + # - Up + # One line up. + # - Down + # One line down. + # - Left + # One character left. + # - Right + # One character right. + # - First + # First column, or beginning of the line when already at the first column. + # - Last + # Last column, or beginning of the line when already at the last column. + # - FirstOccupied + # First non-empty cell in this terminal row, or first non-empty cell of + # the line when already at the first cell of the row. + # - High + # Top of the screen. + # - Middle + # Center of the screen. + # - Low + # Bottom of the screen. + # - SemanticLeft + # Start of the previous semantically separated word. + # - SemanticRight + # Start of the next semantically separated word. + # - SemanticLeftEnd + # End of the previous semantically separated word. + # - SemanticRightEnd + # End of the next semantically separated word. + # - WordLeft + # Start of the previous whitespace separated word. + # - WordRight + # Start of the next whitespace separated word. + # - WordLeftEnd + # End of the previous whitespace separated word. + # - WordRightEnd + # End of the next whitespace separated word. + # - Bracket + # Character matching the bracket at the cursor's location. + # - SearchNext + # Beginning of the next match. + # - SearchPrevious + # Beginning of the previous match. + # - SearchStart + # Start of the match to the left of the vi mode cursor. + # - SearchEnd + # End of the match to the right of the vi mode cursor. + # + # - Search mode exclusive actions: + # - SearchFocusNext + # Move the focus to the next search match. + # - SearchFocusPrevious + # Move the focus to the previous search match. + # - SearchConfirm + # - SearchCancel + # - SearchClear + # Reset the search regex. + # - SearchDeleteWord + # Delete the last word in the search regex. + # - SearchHistoryPrevious + # Go to the previous regex in the search history. + # - SearchHistoryNext + # Go to the next regex in the search history. + # + # - macOS exclusive actions: + # - ToggleSimpleFullscreen + # Enter fullscreen without occupying another space. + # + # - Linux/BSD exclusive actions: + # + # - CopySelection + # Copy from the selection buffer. + # - PasteSelection + # Paste from the selection buffer. + # + # - `command`: Fork and execute a specified command plus arguments + # + # The `command` field must be a map containing a `program` string and an + # `args` array of command line parameter strings. For example: + # `{ program: "alacritty", args: ["-e", "vttest"] }` + # + # And optionally: + # + # - `mods`: Key modifiers to filter binding actions + # + # - Command + # - Control + # - Option + # - Super + # - Shift + # - Alt + # + # Multiple `mods` can be combined using `|` like this: + # `mods: Control|Shift`. + # Whitespace and capitalization are relevant and must match the example. + # + # - `mode`: Indicate a binding for only specific terminal reported modes + # + # This is mainly used to send applications the correct escape sequences + # when in different modes. + # + # - AppCursor + # - AppKeypad + # - Search + # - Alt + # - Vi + # + # A `~` operator can be used before a mode to apply the binding whenever + # the mode is *not* active, e.g. `~Alt`. + # + # Bindings are always filled by default, but will be replaced when a new + # binding with the same triggers is defined. To unset a default binding, it can + # be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for + # a no-op if you do not wish to receive input characters for that binding. + # + # If the same trigger is assigned to multiple actions, all of them are executed + # in the order they were defined in. key_bindings: - { key: N, mods: Control, action: CreateNewWindow } # - { key: Paste, action: Paste } @@ -771,7 +769,12 @@ key_bindings: # Vi Mode #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } - - { key: Escape, mods: Shift, mode: ~Search, action: ToggleViMode } + - { + key: Escape, + mods: Shift, + mode: ~Search, + action: ToggleViMode + } #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } #- { key: Escape, mode: Vi|~Search, action: ClearSelection } #- { key: I, mode: Vi|~Search, action: ToggleViMode } @@ -834,9 +837,9 @@ key_bindings: #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } # (Windows, Linux, and BSD only) - - { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - - { key: Return, mods: Alt, action: ToggleFullscreen } + - { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } + - { key: C, mods: Control|Shift, action: Copy } + # - { key: Return, mods: Alt, action: ToggleFullscreen } #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } @@ -866,11 +869,13 @@ key_bindings: #- { key: Q, mods: Command, action: Quit } #- { key: W, mods: Command, action: Quit } #- { key: N, mods: Command, action: SpawnNewInstance } - - { key: Return, mods: Command, action: ToggleFullscreen } + # NOTE: Use Command + Control + F + # + # - { key: Return, mods: Command, action: ToggleFullscreen } #- { key: F, mods: Command, mode: ~Search, action: SearchForward } #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } -#debug: + #debug: # Display the time it takes to redraw each frame. #render_timer: false diff --git a/native_configs/kitty/kitty.conf b/native_configs/kitty/kitty.conf new file mode 100644 index 0000000..b4cde8c --- /dev/null +++ b/native_configs/kitty/kitty.conf @@ -0,0 +1,85 @@ +# Font configuration +font_family Hack Nerd Font Mono +bold_font Hack Nerd Font Mono Bold +italic_font Hack Nerd Font Mono Italic +bold_italic_font Hack Nerd Font Mono Bold Italic + +sync_to_monitor no +disable_ligatures never + +# NO BELLS! +enable_audio_bell no + +# theme gruvbox_dark +# include /themes/gruvbox_dark.conf + +# window_margin_width 5.0 +# window_padding_width 5.0 + +# I'm on Prime's team here, blinking cursor is too distracting +cursor_blink_interval 0 + +background #282c34 +dynamic_background_opacity true + +# from nvim-nonicons +# symbol_map U+f101-U+f208 nonicon regular + + +# No creating windows +map ctrl+shift+enter noop +map cmd+enter noop + +# I don't understand why some of these have remaps on MacOS +map ctrl+shift+n noop # new_os_window +map cmd+n noop # new_os_window + +map ctrl+shift+w close_window +map shft+cmd+d noop # just disable any apple-linux segregation + +# tabs + +## Tab creation +map ctrl+shift+t new_tab +map cmd+t noop + +## No tab destruction +map ctrl+shift+q noop +map ctrl+shift+w noop + +## No tab iteration +map ctrl+shift+right noop # next_tab +map shift+cmd+] noop # next_tab 🍎 +map ctrl+tab noop # next_tab + +map ctrl+shift+left noop # previous_tab +map shift+cmd+[ noop # previous_tab 🍎 +map ctrl+shift+tab noop # previous_tab + +## Tab lienar jumping +map ctrl+1 goto_tab 1 +map ctrl+2 goto_tab 2 +map ctrl+3 goto_tab 3 +map ctrl+4 goto_tab 4 +map ctrl+5 goto_tab 5 + +## Just disable all iteration of tab - use linear mapping 1-5 +map ctrl+shift+right noop +map shift+cmd+] noop +map ctrl+tab noop +map ctrl+shift+left noop +map shift+cmd+[ noop +map ctrl+shift+tab noop + +## Titles +map ctrl+shift+, set_tab_title +map ctrl+shift+alt+t noop # set_tab_title +map shift+cmd+i noop # set_tab_title + + + +# map ctrl+shift+p>n kitten hints --type=linenum --linenum-action=tab nvim +{line} {path} + +# I don't really have good way to ever press F1 +# map f1 kitten hints --customize-processing hint_define_word.py + diff --git a/nix/repo/home-configs/default.nix b/nix/repo/home-configs/default.nix index eed881e..c6c33dd 100644 --- a/nix/repo/home-configs/default.nix +++ b/nix/repo/home-configs/default.nix @@ -21,6 +21,7 @@ base-modules = [ home-profiles.alacritty + home-profiles.kitty home-profiles.git home-profiles.ssh home-profiles.shells diff --git a/nix/repo/home-modules/default.nix b/nix/repo/home-modules/default.nix index 23d5825..0d427a4 100644 --- a/nix/repo/home-modules/default.nix +++ b/nix/repo/home-modules/default.nix @@ -150,6 +150,48 @@ in { }; }; + kitty = { + config, + lib, + # pkgs, + ... + }: let + cfg = config."${namespace}".kitty; + in { + options."${namespace}".kitty = { + font.family = lib.mkOption { + type = lib.types.nullOr lib.types.singleLineStr; + default = null; + description = "Font family for Kitty"; + }; + font.size = lib.mkOption { + type = lib.types.nullOr lib.types.number; + default = 11.0; + description = '' + The default font size for Kitty. This is probably measured in px. + ''; + example = 7.0; + }; + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enables kitty"; + }; + config = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = "Path to kitty.conf. See https://sw.kovidgoyal.net/kitty/conf.html"; + example = ../../../native_configs/kitty/kitty.conf; + }; + }; + config.programs.kitty = { + enable = cfg.enable; + font.name = lib.mkIf (cfg.font.family != null) cfg.font.family; + font.size = cfg.font.size; + setings = lib.mkIf (cfg.config != null) (builtins.readFile cfg.config); + }; + }; + # TODO: chromium is not really supported on darwin private_chromium = { config, diff --git a/nix/repo/home-profiles/default.nix b/nix/repo/home-profiles/default.nix index 1214676..72d0f84 100644 --- a/nix/repo/home-profiles/default.nix +++ b/nix/repo/home-profiles/default.nix @@ -67,9 +67,7 @@ in { config, lib, ... - }: let - cfg = config."${namespace}".alacritty; - in { + }: { imports = [ inputs.cells.repo.home-modules.alacritty ]; @@ -81,6 +79,21 @@ in { }; }; + kitty = { + config, + lib, + ... + }: { + imports = [ + inputs.cells.repo.home-modules.kitty + ]; + config."${namespace}".kitty = { + enable = true; + font.size = 11.0; + config = ../../../native_configs/kitty/kitty.conf; + }; + }; + shells = import ./shells.nix imports; git = {