Merge pull request 'use kitty instead of foot' (#11) from use-kitty-again into main

Reviewed-on: #11
This commit is contained in:
Charlotte 🦝 Delenk 2023-04-16 09:13:37 +00:00
commit 69ca23326e
Signed by: gitea-bot
GPG key ID: C9974EDF9932B558
11 changed files with 80 additions and 84 deletions

View file

@ -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 = [

View file

@ -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

View file

@ -28,6 +28,7 @@
../programs/keepass.nix
../programs/kicad.nix
../programs/misc.nix
../programs/kitty.nix
../programs/zk.nix
]
else []

View file

@ -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";
};
};
};
}

14
config/programs/kitty.nix Normal file
View file

@ -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
'';
};
}

View file

@ -6,6 +6,6 @@
display-drun = " Apps ";
display-run = " Run ";
};
terminal = "${pkgs.foot}/bin/foot";
terminal = "${pkgs.kitty}/bin/kitty";
};
}

View file

@ -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%";

View file

@ -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";

View file

@ -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";

View file

@ -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": {

View file

@ -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";