From 6813033aeed2ceac5d1397abfb52fa9618af364a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 2 Oct 2023 17:17:30 -0500 Subject: [PATCH] WIP font --- home/user.nix | 8 +++ modules/desktop-usage.nix | 127 +++++++++++++++++++++++++++++++++++++- nixos/common.nix | 2 +- nixos/thinker.nix | 2 - 4 files changed, 135 insertions(+), 4 deletions(-) diff --git a/home/user.nix b/home/user.nix index b158c5b..41b6009 100644 --- a/home/user.nix +++ b/home/user.nix @@ -11,6 +11,14 @@ in # }; # }; + # TODO: fonts? right now I do this: + # curl -o ~/Downloads/iosevkalyte.tar.zstd https://files.lyte.dev/iosevkalyte/rel/iosevkalyteterm-16.4.0.tar.zstd + # tar --zstd -xvf ~/Downloads/iosevka.tar.zstd + # mkdir -p ~/.local/share/fonts + # cp -r iosevkalyteterm/ttf/* ~/.local/share/fonts + # TODO: I bet I can declare an iosevka font build, too, instead + # TODO: wallpaper? + home = { username = lib.mkDefault "daniel"; homeDirectory = lib.mkDefault "/home/daniel/.home"; diff --git a/modules/desktop-usage.nix b/modules/desktop-usage.nix index 3cd49a9..1830223 100644 --- a/modules/desktop-usage.nix +++ b/modules/desktop-usage.nix @@ -1,10 +1,135 @@ -{ ... }: { +{ pkgs, ... }: { # TODO: add a DE and include either plasma or gnome as a fallback? imports = [ ./sway.nix ./user-installed-applications.nix ]; + fonts.packages = with pkgs; [ + (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) + (iosevka.override { + set = "lyteterm"; + privateBuildPlan = '' + [buildPlans.iosevka-lyteterm] + family = "IosevkaLyteTerm" + spacing = "fontconfig-mono" + serifs = "sans" + export-glyph-names = true + + [buildPlans.iosevka-lyteterm.ligations] + inherits = "dlig" + disables = [ "exeqeqeq", "exeqeq", "exeqeq-dl", "exeq", "ineq", "connected-underscore", "connected-tilde-as-wave" ] + + [buildPlans.iosevka-lyteterm.weights.regular] + shape = 400 + menu = 400 + css = 400 + + [buildPlans.iosevka-lyteterm.weights.book] + shape = 450 + menu = 450 + css = 450 + + [buildPlans.iosevka-lyteterm.weights.bold] + shape = 700 + menu = 700 + css = 700 + + [buildPlans.iosevka-lyteterm.weights.black] + shape = 900 + menu = 900 + css = 900 + + # [[buildPlans.iosevka-lyteterm.compatibility-ligatures]] + # unicode = 57600 # 0xE100 + # featureTag = 'calt' + # kequence = '<*>' + + [buildPlans.iosevka-lyteterm.variants] + inherits = "ss01" + + [buildPlans.iosevka-lyteterm.variants.design] + capital-a = 'curly-serifless' + capital-b = 'standard-interrupted-serifless' + capital-c = 'unilateral-inward-serifed' + capital-d = 'standard-serifless' + capital-g = 'toothless-rounded-inward-serifed-hooked' + capital-i = 'serifed' + capital-j = 'serifed' + capital-k = 'curly-serifless' + capital-l = 'motion-serifed' + capital-m = 'hanging-serifless' + capital-n = 'asymmetric-serifless' + capital-p = 'open-serifless' + capital-q = 'crossing' + capital-r = 'standing-open' + capital-s = 'unilateral-inward-serifed' + capital-t = 'motion-serifed' + capital-u = 'toothless-corner' + capital-v = 'curly' + capital-w = 'curly' + capital-x = 'curly-serifless' + capital-y = 'curly-base-serifed' + capital-z = 'curly-top-serifed-with-crossbar' + a = 'double-storey-toothless-corner' + b = 'toothless-corner' + c = 'unilateral-inward-serifed' + d = 'toothless-corner-serifless' + e = 'flat-crossbar' + f = 'tailed' + g = 'double-storey-open' + # g = 'single-storey-earless-corner-flat-hook' + h = 'straight' + i = 'tailed-serifed' + j = 'serifed' + k = 'curly-serifless' + l = 'tailed-serifed' + m = 'earless-corner-double-arch' + n = 'earless-corner-straight' + p = 'earless-corner' + q = 'earless-corner' + r = 'earless-corner' + s = 'unilateral-inward-serifed' + t = 'flat-hook' + u = 'toothless-corner' + v = 'curly' + w = 'curly' + x = 'curly-serifless' + y = 'curly-turn' + z = 'curly-top-serifed-with-crossbar' + # cyrl-capital-ze = 'unilateral-inward-serifed' + zero = 'slashed-split' + one = 'base' + two = 'curly-neck' + three = 'two-arcs' + four = 'semi-open-non-crossing' + five = 'vertical-upper-left-bar' + six = 'straight-bar' + seven = 'curly-crossbar-serifed' + eight = 'two-circles' + nine = 'straight-bar' + tilde = 'low' + asterisk = 'penta-low' + underscore = 'above-baseline' + pilcrow = 'low' + caret = 'low' + paren = 'flat-arc' + brace = 'curly-flat-boundary' + number-sign = 'upright-open' + ampersand = 'upper-open' + at = 'short' + dollar = 'interrupted' + cent = 'open' + percent = 'rings-segmented-slash' + bar = 'force-upright' + ascii-single-quote = 'raised-comma' + ascii-grave = 'straight' + question = 'smooth' + punctuation-dot = 'round' + ''; + }) + ]; + hardware = { opengl = { enable = true; diff --git a/nixos/common.nix b/nixos/common.nix index bd83146..70c4bbc 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -146,8 +146,8 @@ in }; nix = { - trustedUsers = [ "root" "daniel" ]; settings = { + trusted-users = [ "root" "daniel" ]; experimental-features = lib.mkDefault [ "nix-command" "flakes" ]; substituters = [ "https://nix.h.lyte.dev" diff --git a/nixos/thinker.nix b/nixos/thinker.nix index ccc68e8..9d8fad7 100644 --- a/nixos/thinker.nix +++ b/nixos/thinker.nix @@ -14,8 +14,6 @@ # need to measure percentage lost per day, but I think it's around 10%/day # it looks like I may have had hibernation working -- see ../old/third.nix - # TODO: fonts? right now, I'm just installing to ~/.local/share/fonts - # hardware boot.loader.efi.canTouchEfiVariables = true; boot.loader.systemd-boot.enable = true;