forked from mirrors_public/oddlama_nix-config
feat: add stylix and switch font to (very similar) JetBrainsMono for italic support
This commit is contained in:
parent
e65dac849a
commit
75e943cd1e
8 changed files with 229 additions and 61 deletions
76
flake.lock
generated
76
flake.lock
generated
|
@ -60,6 +60,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"base16": {
|
||||||
|
"inputs": {
|
||||||
|
"fromYaml": "fromYaml"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689633990,
|
||||||
|
"narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"rev": "dddf2e1c04845d43c89a8e9e37d574519649a404",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"colmena": {
|
"colmena": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
@ -296,6 +314,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_6": {
|
||||||
|
"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": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
|
@ -390,6 +424,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fromYaml": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689549921,
|
||||||
|
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -834,6 +884,7 @@
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"nixseparatedebuginfod": "nixseparatedebuginfod",
|
"nixseparatedebuginfod": "nixseparatedebuginfod",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||||
|
"stylix": "stylix",
|
||||||
"templates": "templates"
|
"templates": "templates"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -880,6 +931,31 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"stylix": {
|
||||||
|
"inputs": {
|
||||||
|
"base16": "base16",
|
||||||
|
"flake-compat": "flake-compat_6",
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694375893,
|
||||||
|
"narHash": "sha256-oJGESNjJ/6o6tfuUavBZ7go4Oun7g9YKv7OqaQaY/80=",
|
||||||
|
"owner": "danth",
|
||||||
|
"repo": "stylix",
|
||||||
|
"rev": "c3c9f4784b4f08f6676340126858d936edbce1fa",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "danth",
|
||||||
|
"repo": "stylix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|
24
flake.nix
24
flake.nix
|
@ -2,6 +2,17 @@
|
||||||
description = " ❄️ oddlama's nix config and dotfiles";
|
description = " ❄️ oddlama's nix config and dotfiles";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
agenix = {
|
||||||
|
url = "github:ryantm/agenix";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
agenix-rekey = {
|
||||||
|
url = "github:oddlama/agenix-rekey";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
colmena = {
|
colmena = {
|
||||||
url = "github:oddlama/colmena";
|
url = "github:oddlama/colmena";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -23,6 +34,8 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -77,18 +90,13 @@
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
agenix = {
|
stylix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:danth/stylix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.home-manager.follows = "home-manager";
|
inputs.home-manager.follows = "home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
agenix-rekey = {
|
|
||||||
url = "github:oddlama/agenix-rekey";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
templates.url = "github:NixOS/templates";
|
templates.url = "github:NixOS/templates";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
|
@ -33,4 +33,11 @@
|
||||||
gpg-connect-agent /bye
|
gpg-connect-agent /bye
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
stylix.fonts.sizes = {
|
||||||
|
#desktop = 20;
|
||||||
|
#applications = 20;
|
||||||
|
terminal = 20;
|
||||||
|
#popups = 20;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{lib, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit
|
inherit
|
||||||
(lib)
|
(lib)
|
||||||
mkOption
|
mkOption
|
||||||
|
@ -6,10 +11,12 @@
|
||||||
;
|
;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
./steam.nix
|
||||||
./wayland.nix
|
./wayland.nix
|
||||||
./xserver.nix
|
./xserver.nix
|
||||||
./steam.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.graphical.gaming.enable = mkOption {
|
options.graphical.gaming.enable = mkOption {
|
||||||
|
@ -21,5 +28,29 @@ in {
|
||||||
config = {
|
config = {
|
||||||
# Needed for gtk
|
# Needed for gtk
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
stylix = {
|
||||||
|
# I want to choose what to style myself.
|
||||||
|
autoEnable = false;
|
||||||
|
polarity = "dark";
|
||||||
|
image = config.lib.stylix.pixel "base00";
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
fonts = {
|
fonts = {
|
||||||
fontconfig = {
|
|
||||||
# Always prefer emojis even if the original font would provide a glyph
|
# Always prefer emojis even if the original font would provide a glyph
|
||||||
localConf = ''
|
fontconfig.localConf = ''
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
|
@ -30,23 +25,38 @@
|
||||||
</alias>
|
</alias>
|
||||||
</fontconfig>
|
</fontconfig>
|
||||||
'';
|
'';
|
||||||
defaultFonts = {
|
|
||||||
emoji = ["Segoe UI Emoji" "Noto Fonts Emoji"];
|
|
||||||
monospace = ["FiraCode Nerd Font"];
|
|
||||||
sansSerif = lib.mkBefore ["Segoe UI"];
|
|
||||||
serif = ["Source Serif Pro"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
(nerdfonts.override {fonts = ["FiraCode" "FiraMono" "SourceCodePro" "JetBrainsMono"];})
|
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||||
dejavu_fonts
|
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-cjk-serif
|
noto-fonts-cjk-serif
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
noto-fonts-extra
|
noto-fonts-extra
|
||||||
segoe-ui-ttf
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
stylix.fonts = {
|
||||||
|
serif = {
|
||||||
|
package = pkgs.dejavu_fonts;
|
||||||
|
name = "IBM Plex Serif";
|
||||||
|
};
|
||||||
|
|
||||||
|
sansSerif = {
|
||||||
|
package = pkgs.segoe-ui-ttf;
|
||||||
|
name = "Segoe UI";
|
||||||
|
};
|
||||||
|
|
||||||
|
monospace = {
|
||||||
|
# No need for patched nerd fonts, kitty can pick up on them automatically,
|
||||||
|
# and ideally every program should do that: https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font
|
||||||
|
package = pkgs.jetbrains-mono;
|
||||||
|
name = "JetBrains Mono";
|
||||||
|
};
|
||||||
|
|
||||||
|
emoji = {
|
||||||
|
package = pkgs.segoe-ui-ttf;
|
||||||
|
name = "Segoe UI Emoji";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,6 @@
|
||||||
./config/shell
|
./config/shell
|
||||||
./config/utils.nix
|
./config/utils.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.configFile."nixpkgs/config.nix".text = "{ allowUnfree = true; }";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||||
};
|
};
|
||||||
|
stylix.targets.kitty.enable = true;
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
font_family = "FiraCode Nerd Font";
|
bold_font = "${config.programs.kitty.font.name} Bold";
|
||||||
font_size = 20;
|
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.
|
# Do not wait for inherited child processes.
|
||||||
close_on_child_death = "yes";
|
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";
|
||||||
"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
|
# 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"
|
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"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
x11.enable = true;
|
x11.enable = true;
|
||||||
|
@ -29,17 +33,14 @@
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = {
|
|
||||||
package = pkgs.segoe-ui-ttf;
|
|
||||||
name = "Segoe UI";
|
|
||||||
};
|
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "WhiteSur-dark";
|
name = "WhiteSur-dark";
|
||||||
package = pkgs.whitesur-icon-theme;
|
package = pkgs.whitesur-icon-theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
# TODO test other themes
|
||||||
|
theme = lib.mkForce {
|
||||||
name = "WhiteSur-Dark-solid";
|
name = "WhiteSur-Dark-solid";
|
||||||
package = pkgs.whitesur-gtk-theme;
|
package = pkgs.whitesur-gtk-theme;
|
||||||
};
|
};
|
||||||
|
@ -55,4 +56,27 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gtk";
|
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;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue