From b1984a512c64fa89759873c2af2b8196271c0bd8 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Thu, 15 Feb 2024 23:58:24 +0800 Subject: [PATCH] feat: update `ryan-mono` --- home/apps/vscode.nix | 52 ++++++++++++++++++++------------------ modules/homebrew.nix | 2 ++ overlays/ryan-mono-bin.nix | 33 ++++++++++++------------ 3 files changed, 46 insertions(+), 41 deletions(-) diff --git a/home/apps/vscode.nix b/home/apps/vscode.nix index dea148f..883fd5f 100644 --- a/home/apps/vscode.nix +++ b/home/apps/vscode.nix @@ -10,32 +10,32 @@ "bierner.lit-html" "bmalehorn.vscode-fish" "bradlc.vscode-tailwindcss" - "Catppuccin.catppuccin-vsc" - # "Catppuccin.catppuccin-vsc-icons" + "catppuccin.catppuccin-vsc" + "catppuccin.catppuccin-vsc-icons" "charliermarsh.ruff" "dbaeumer.vscode-eslint" "denoland.vscode-deno" "dprint.dprint" - "DotJoshJohnson.xml" + "dotjoshjohnson.xml" "eamodio.gitlens" - "EditorConfig.EditorConfig" - "enkia.tokyo-night" + "editorconfig.editorconfig" + # "enkia.tokyo-night" "esbenp.prettier-vscode" "github.vscode-github-actions" - "GraphQL.vscode-graphql" - "GraphQL.vscode-graphql-syntax" + "graphql.vscode-graphql" + "graphql.vscode-graphql-syntax" "golang.go" "griimick.vhs" - "LeonardSSH.vscord" + "leonardssh.vscord" # "jdinhlife.gruvbox" "jnoortheen.nix-ide" - "miguelsolorio.symbols" + # "miguelsolorio.symbols" "ms-python.isort" "ms-python.vscode-pylance" "ms-python.python" # "mvllow.rose-pine" "nvarner.typst-lsp" - "Prisma.prisma" + "prisma.prisma" "ronnidc.nunjucks" "rust-lang.rust-analyzer" "sastan.twind-intellisense" @@ -45,16 +45,16 @@ "timonwong.shellcheck" "unifiedjs.vscode-mdx" "usernamehw.errorlens" - "Vue.volar" + "vue.volar" "xaver.clang-format" - "YoavBls.pretty-ts-errors" + "yoavbls.pretty-ts-errors" ]; in { programs.vscode = { enable = true; package = pkgs.stdenv.mkDerivation { pname = "vscode"; - version = "1.85.2"; + version = "1.86.2"; src = pkgs.emptyDirectory; installPhase = '' mkdir -p $out @@ -65,9 +65,8 @@ in { mutableExtensionsDir = true; userSettings = { - "workbench.colorTheme" = "Tokyo Night"; - "workbench.iconTheme" = "symbols"; - "workbench.productIconTheme" = "icons-carbon"; + "workbench.colorTheme" = "Catppuccin Frappé"; + "workbench.iconTheme" = "catppuccin-frappe"; "workbench.sideBar.location" = "left"; "workbench.activityBar.location" = "top"; @@ -76,11 +75,15 @@ in { "catppuccin.boldKeywords" = false; "catppuccin.italicKeywords" = true; "catppuccin.accentColor" = "sky"; - "catppuccin.workbenchMode" = "default"; + "catppuccin.workbenchMode" = "flat"; "catppuccin.customUIColors" = { "all" = { "activityBar.activeBorder" = "accent"; "statusBarItem.remoteBackground" = "accent"; + "activityBarTop.foreground" = "text"; + "activityBarTop.inactiveForeground" = "subtext1"; + "activityBarTop.activeBorder" = "accent"; + "activityBarTop.dropBorder" = "accent"; }; }; @@ -92,7 +95,7 @@ in { "diffEditor.ignoreTrimWhitespace" = false; "gitlens.showWelcomeOnInstall" = false; - "editor.fontFamily" = "\"RyanMono Nerd Font\", monospace"; + "editor.fontFamily" = "\"Ryan Mono\", \"Symbols Nerd Font\", \"Apple Color Emoji\", monospace"; "editor.fontLigatures" = true; # "editor.fontLigatures" = "'calt', 'ss01'"; "editor.fontSize" = 16; @@ -108,7 +111,7 @@ in { "editor.insertSpaces" = true; "editor.formatOnSave" = true; - "terminal.integrated.fontFamily" = "\"RyanTerm Nerd Font\", monospace"; + "terminal.integrated.fontFamily" = "\"Ryan Term\", \"Symbols Nerd Font\", \"Apple Color Emoji\", monospace"; "terminal.integrated.fontSize" = 14; "terminal.integrated.lineHeight" = 1.5; "terminal.integrated.cursorBlinking" = true; @@ -116,19 +119,20 @@ in { "terminal.integrated.inheritEnv" = false; "terminal.integrated.shellIntegration.enabled" = true; + "editor.defaultFormatter" = "esbenp.prettier-vscode"; + "javascript.preferGoToSourceDefinition" = true; "typescript.preferGoToSourceDefinition" = true; + "typescript.enablePromptUseWorkspaceTsdk" = true; - "shellcheck.ignorePatterns" = { - ".envrc" = true; - }; - "editor.defaultFormatter" = "esbenp.prettier-vscode"; + "eslint.experimental.useFlatConfig" = true; + + "shellcheck.ignorePatterns".".envrc" = true; "tailwindCSS.includeLanguages" = { "typescript" = "javascript"; "typescriptreact" = "javascript"; "vue-html" = "html"; }; - "typescript.enablePromptUseWorkspaceTsdk" = true; "telemetry.telemetryLevel" = "off"; "workbench.enableExperiments" = false; diff --git a/modules/homebrew.nix b/modules/homebrew.nix index 8789c67..55a6126 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -16,6 +16,8 @@ _: { brews = [ "pandoc" + "fontforge" + "ttfautohint" ]; casks = let diff --git a/overlays/ryan-mono-bin.nix b/overlays/ryan-mono-bin.nix index 6866e20..1a0b8e3 100644 --- a/overlays/ryan-mono-bin.nix +++ b/overlays/ryan-mono-bin.nix @@ -1,5 +1,5 @@ (_: prev: let - version = "2023.11.26"; + version = "2024.02.15"; mkFontVariant = { variant, @@ -8,38 +8,37 @@ prev.callPackage ({ lib, fetchzip, + stdenvNoCC, }: - fetchzip rec { + stdenvNoCC.mkDerivation { pname = variant; inherit version; - url = "https://github.com/ryanccn/ryan-mono/releases/download/${version}/${variant}.zip"; - stripRoot = false; + src = fetchzip { + url = "https://github.com/ryanccn/ryan-mono/releases/download/v${version}/${variant}.tar.xz"; + stripRoot = false; + inherit hash; + }; - postFetch = '' - postDir="$TMPDIR/post" - mkdir -p $postDir - mv $out/* $postDir - mkdir -p $out/share/fonts/truetype - mv $postDir/*.ttf $out/share/fonts/truetype + buildPhase = '' + mkdir -p "$out"/share/fonts/truetype + cp *.ttf "$out"/share/fonts/truetype ''; - inherit hash; - meta = with lib; { homepage = "https://github.com/ryanccn/ryan-mono"; - description = "Iosevka with customizations and Nerd Font patches"; platforms = platforms.all; + license = licenses.ofl; }; }) {}; in { ryan-mono-bin = mkFontVariant { - variant = "ryan-mono"; - hash = "sha256-hA9Z1SOD9Ij1sPSyHXg9SUMPuJqKnocYfXwCTMAgJJU="; + variant = "RyanMono"; + hash = "sha256-9ojd6qCMf+lGa//5ZmY/ob6sbJvkBLqWTjyz7I5Yr4M="; }; ryan-term-bin = mkFontVariant { - variant = "ryan-term"; - hash = "sha256-j/1wvyN60m7SlUV0c6tk2jgj53EEgWEJMcCOvbrAkVI="; + variant = "RyanTerm"; + hash = "sha256-23+qURL4jBzsnyglPrYYF2pBTkp/WpzR9GQ2nbuJC4E="; }; })