diff --git a/flake.lock b/flake.lock index faedfa86..ef4520a8 100644 --- a/flake.lock +++ b/flake.lock @@ -237,7 +237,41 @@ "type": "github" } }, + "iosevka-custom": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1709500140, + "narHash": "sha256-UHaP0bLIcdvsm+D5bsJTEgIzct/p2J0Efk8RqGvz52Y=", + "ref": "refs/heads/main", + "rev": "b1006dd48c47fefca879612360567d5c17038197", + "revCount": 4, + "type": "git", + "url": "https://git.xenia.me.uk/xenia/iosevka.git" + }, + "original": { + "type": "git", + "url": "https://git.xenia.me.uk/xenia/iosevka.git" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1709237383, + "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1709237383, "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", @@ -256,7 +290,8 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "iosevka-custom": "iosevka-custom", + "nixpkgs": "nixpkgs_2", "stylix": "stylix" } }, diff --git a/flake.nix b/flake.nix index 90c0917e..e033141e 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; + iosevka-custom.url = "git+https://git.xenia.me.uk/xenia/iosevka.git"; }; outputs = { @@ -23,6 +24,7 @@ nixpkgs, home-manager, stylix, + iosevka-custom, ... }: let systemConfig = { @@ -81,6 +83,16 @@ nixpkgs.config.allowUnfree = true; networking = {inherit hostName;}; programs.${defaultUserShell}.enable = true; + stylix.fonts = let + font = name: { + name = iosevka-custom.outputs.names."iosevka-custom-${name}"; + package = iosevka-custom.outputs.packages.${system}."iosevka-custom-${name}"; + }; + in { + serif = font "etoile"; + sansSerif = font "aile"; + monospace = font "nerdfont"; + }; system = { inherit stateVersion; autoUpgrade = { diff --git a/system/iosevka.nix b/system/iosevka.nix deleted file mode 100644 index ffd10334..00000000 --- a/system/iosevka.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ - stdenv, - iosevka, - nerd-font-patcher, -}: let - customBuildPlan = { - noCvSs = true; - exportGlyphNames = false; - ligations.inherits = "dlig"; - weights = { - Regular = { - shape = 400; - menu = 400; - css = 400; - }; - Bold = { - shape = 700; - menu = 700; - css = 700; - }; - }; - variants.design = { - capital-g = "toothless-corner-serifless-hooked"; - capital-j = "serifed-both-sides"; - capital-q = "crossing"; - capital-r = "curly-serifless"; - e = "rounded"; - f = "tailed"; - g = "double-storey-open"; - i = "tailed-serifed"; - j = "serifed"; - k = "cursive-serifless"; - l = "tailed-serifed"; - q = "diagonal-tailed-serifless"; - y = "cursive-serifless"; - z = "straight-serifless-with-horizontal-crossbar"; - lower-delta = "flat-top"; - lower-lambda = "tailed-turn"; - lower-xi = "flat-top"; - lower-chi = "semi-chancery-straight"; - zero = "tall-slashed"; - one = "no-base"; - two = "straight-neck"; - three = "flat-top"; - four = "semi-open"; - five = "oblique-arched"; - six = "open-contour"; - seven = "bend-serifless-crossbar"; - eight = "two-circles"; - nine = "open-contour"; - asterisk = "hex-low"; - underscore = "high"; - caret = "high"; - paren = "normal"; - brace = "straight"; - number-sign = "slanted"; - ampersand = "closed"; - at = "fourfold"; - percent = "dots"; - question = "corner"; - lig-ltgteq = "flat"; - lig-neq = "more-slanted"; - lig-equal-chain = "without-notch"; - lig-hyphen-chain = "without-notch"; - lig-double-arrow-bar = "without-notch"; - lig-single-arrow-bar = "without-notch"; - }; - }; -in { - etoile = rec { - name = "Iosevka Custom Etoile"; - package = iosevka.override { - set = "etoile"; - privateBuildPlan = { - inherit (customBuildPlan) noCvSs exportGlyphNames variants weights; - family = name; - spacing = "quasi-proportional"; - serifs = "slab"; - }; - }; - }; - aile = rec { - name = "Iosevka Custom Aile"; - package = iosevka.override { - set = "aile"; - privateBuildPlan = { - inherit (customBuildPlan) noCvSs exportGlyphNames variants weights; - family = name; - spacing = "quasi-proportional"; - serifs = "sans"; - }; - }; - }; - nerdfont = let - font = iosevka.override { - set = "custom"; - privateBuildPlan = { - inherit (customBuildPlan) noCvSs exportGlyphNames variants weights; - family = "Iosevka Custom"; - spacing = "normal"; - serifs = "sans"; - }; - }; - in { - name = "IosevkaCustomNerdFont"; - package = stdenv.mkDerivation { - name = "${font.name}-nerd-font-patched"; - src = font; - nativeBuildInputs = [nerd-font-patcher]; - buildPhase = '' - find \( -name \*.ttf -o -name \*.otf \) -execdir nerd-font-patcher -c {} \; - ''; - installPhase = "cp -a . $out"; - }; - }; -} diff --git a/system/stylix.nix b/system/stylix.nix index bebd409e..9ea09520 100644 --- a/system/stylix.nix +++ b/system/stylix.nix @@ -25,20 +25,13 @@ package = pkgs.catppuccin-cursors.${variant}; name = "Catppuccin-${catppuccinVariant}-Dark-Cursors"; }; - fonts = let - iosevkaCustom = import ./iosevka.nix { - inherit (pkgs) stdenv iosevka nerd-font-patcher; - }; - in { + fonts = { sizes = { applications = 16; desktop = 20; popups = 20; terminal = 16; }; - serif = {inherit (iosevkaCustom.etoile) name package;}; - sansSerif = {inherit (iosevkaCustom.aile) name package;}; - monospace = {inherit (iosevkaCustom.nerdfont) name package;}; emoji = { name = "EmojiOne Color"; package = pkgs.emojione;