From 16af035eb33f5010f969519eb7d718e0fd670c38 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 11 Oct 2023 22:39:54 +0200 Subject: [PATCH] Add custom font --- nixos/flake.nix | 4 ++++ nixos/modules/default.nix | 10 ++++++---- nixos/overlays/letter/default.nix | 18 +++++++++++++++++ .../alacritty/.config/alacritty/alacritty.yml | 20 +++++++++---------- stow/kitty/.config/kitty/kitty.conf | 12 +++++------ 5 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 nixos/overlays/letter/default.nix diff --git a/nixos/flake.nix b/nixos/flake.nix index 2440f38..ee2996e 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -38,6 +38,10 @@ allowUnfree = true; }; + sharedOverlays = [ + (import ./overlays/letter) + ]; + hostDefaults = { inherit system; diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 6eb2beb..e150275 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -15,6 +15,11 @@ keep-derivations = true ''; + fonts.fonts = with pkgs; [ + corefonts # Calibri for Uni + letter # Personal font + ]; + users.users.tdpeuter = { description = "Tibo De Peuter"; isNormalUser = true; @@ -50,10 +55,7 @@ stateVersion = "23.05"; packages = with pkgs; [ - gnupg - - # Fonts - corefonts # Calibri for Uni + gnupg ]; }; diff --git a/nixos/overlays/letter/default.nix b/nixos/overlays/letter/default.nix new file mode 100644 index 0000000..d494bf4 --- /dev/null +++ b/nixos/overlays/letter/default.nix @@ -0,0 +1,18 @@ +final: prev: { + letter = final.stdenv.mkDerivation { + name = "letter"; + version = "v1.0.0"; + src = final.fetchFromGitea { + domain = "git.depeuter.dev"; + owner = "tdpeuter"; + repo = "letter"; + rev = "v1.0.0"; + hash = "sha256-2HaXZMIYSauqj9Cy7rRzYGyuYLno9AHAXpWsyD+BdtE="; + }; + + installPhase = '' + mkdir -p $out/share/fonts + cp -R $src/ttf $out/share/fonts/letter + ''; + }; +} diff --git a/stow/alacritty/.config/alacritty/alacritty.yml b/stow/alacritty/.config/alacritty/alacritty.yml index 4ea1c1b..dcd08cc 100644 --- a/stow/alacritty/.config/alacritty/alacritty.yml +++ b/stow/alacritty/.config/alacritty/alacritty.yml @@ -102,41 +102,41 @@ window: #multiplier: 3 # Font configuration -# font: +font: # Normal (roman) font face - # normal: + normal: # Font family # # Default: # - (macOS) Menlo # - (Linux/BSD) monospace # - (Windows) Consolas - # family: Letter + family: Letter # The `style` can be specified to pick a specific face. - # style: Extended + style: Extended # Bold font face - # bold: + bold: # Font family # # If the bold family is not specified, it will fall back to the # value specified for the normal font. - # family: Letter + family: Letter # The `style` can be specified to pick a specific face. - # style: Heavy + style: Heavy # Italic font face - # italic: + italic: # Font family # # If the italic family is not specified, it will fall back to the # value specified for the normal font. - # family: Letter + family: Letter # The `style` can be specified to pick a specific face. - # style: Oblique + style: Oblique # Bold italic font face #bold_italic: diff --git a/stow/kitty/.config/kitty/kitty.conf b/stow/kitty/.config/kitty/kitty.conf index 9f69a3d..2504662 100644 --- a/stow/kitty/.config/kitty/kitty.conf +++ b/stow/kitty/.config/kitty/kitty.conf @@ -8,10 +8,10 @@ include ./themes/tdpeuter-dark.conf #: individual font faces and even specify special fonts for particular #: characters. -# font_family monospace -# bold_font auto -# italic_font auto -# bold_italic_font auto +font_family Letter Extended +bold_font Letter Semibold Extended +italic_font Letter Extended Oblique +bold_italic_font Letter Semibold Extended Oblique #: You can specify different fonts for the bold/italic/bold-italic #: variants. To get a full list of supported fonts use the `kitty @@ -77,7 +77,7 @@ include ./themes/tdpeuter-dark.conf #: narrow_symbols codepoints [optionally the number of cells] -# disable_ligatures never +disable_ligatures always #: Choose how you want to handle multi-character ligatures. The #: default is to always render them. You can tell kitty to not render @@ -363,7 +363,7 @@ touch_scroll_multiplier 2.0 #: much effort. url_color #94E2D5 -url_style stright +url_style straight #: The color and style for highlighting URLs on mouse-over. url_style #: can be one of: none, straight, double, curly, dotted, dashed.