1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add stylix and switch font to (very similar) JetBrainsMono for italic support

This commit is contained in:
oddlama 2023-09-21 17:08:44 +02:00
parent e65dac849a
commit 75e943cd1e
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
8 changed files with 229 additions and 61 deletions

View file

@ -1,12 +1,19 @@
{pkgs, ...}: {
{
config,
lib,
pkgs,
...
}: {
home.sessionVariables = {
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
};
stylix.targets.kitty.enable = true;
programs.kitty = {
enable = true;
settings = {
font_family = "FiraCode Nerd Font";
font_size = 20;
bold_font = "${config.programs.kitty.font.name} Bold";
italic_font = "${config.programs.kitty.font.name} Italic";
bold_italic_font = "${config.programs.kitty.font.name} Bold Italic";
# Do not wait for inherited child processes.
close_on_child_death = "yes";
@ -63,7 +70,10 @@
"ctrl+shift+." = "change_font_size all -2.0";
"ctrl+shift+," = "change_font_size all +2.0";
};
extraConfig = ''
# XXX: mkForce to prevent stylix from appending theme.
# Fix this by making a correct theme that can be used.
# TODO aaaaaaaaaa
extraConfig = lib.mkForce ''
# Use nvim as scrollback pager
scrollback_pager nvim -u NONE -c "set nonumber nolist showtabline=0 foldcolumn=0 laststatus=0" -c "autocmd TermOpen * normal G" -c "silent write! /tmp/kitty_scrollback_buffer | te head -c-1 /tmp/kitty_scrollback_buffer; rm /tmp/kitty_scrollback_buffer; cat"
'';

View file

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
lib,
pkgs,
...
}: {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
@ -29,17 +33,14 @@
};
in {
enable = true;
font = {
package = pkgs.segoe-ui-ttf;
name = "Segoe UI";
};
iconTheme = {
name = "WhiteSur-dark";
package = pkgs.whitesur-icon-theme;
};
theme = {
# TODO test other themes
theme = lib.mkForce {
name = "WhiteSur-Dark-solid";
package = pkgs.whitesur-gtk-theme;
};
@ -55,4 +56,27 @@
enable = true;
platformTheme = "gtk";
};
stylix = {
polarity = "dark";
base16Scheme = {
base00 = "282c34";
base01 = "353b45";
base02 = "3e4451";
base03 = "545862";
base04 = "565c64";
base05 = "abb2bf";
base06 = "b6bdca";
base07 = "c8ccd4";
base08 = "e06c75";
base09 = "d19a66";
base0A = "e5c07b";
base0B = "98c379";
base0C = "56b6c2";
base0D = "61afef";
base0E = "c678dd";
base0F = "be5046";
};
targets.gtk.enable = true;
};
}