From 2e1d4ef8f284b7328ac982acf94fd176b6df4fd0 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 15 Aug 2025 18:22:33 +0800 Subject: [PATCH] chore: update configs --- checks/default.nix | 2 ++ flake.lock | 54 ++++++++++++++++----------------- systems/caladan/homebrew.nix | 17 ++--------- systems/caladan/nix.nix | 4 +++ systems/caladan/packages.nix | 2 +- users/ryan/apps/vscode.nix | 2 ++ users/ryan/default.nix | 2 +- users/ryan/programs/aliases.nix | 25 --------------- users/ryan/programs/fish.nix | 32 +++++++++++-------- users/ryan/programs/zsh.nix | 5 +-- 10 files changed, 63 insertions(+), 82 deletions(-) delete mode 100644 users/ryan/programs/aliases.nix diff --git a/checks/default.nix b/checks/default.nix index 23c6724..493147e 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -45,5 +45,7 @@ nativeBuildInputs = with pkgs; [ reuse ]; }; }; + + formatter = pkgs.nixfmt-rfc-style; }; } diff --git a/flake.lock b/flake.lock index 5fbe07b..03d4f16 100644 --- a/flake.lock +++ b/flake.lock @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1749223974, - "narHash": "sha256-/GAQYRW1duU81KG//2wI9ax8EkHVG/e1UOD97NdwLOY=", + "lastModified": 1755247639, + "narHash": "sha256-YBjSqGgNAejwIIqUv+NTYpm+peXLro79qNBi0SF1JqM=", "owner": "catppuccin", "repo": "nix", - "rev": "3a42cd79c647360ee8742659e42aeec0947dd3b4", + "rev": "bd14b47481c996e2a5d5e5704d55092edf18e892", "type": "github" }, "original": { @@ -67,11 +67,11 @@ ] }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -87,11 +87,11 @@ ] }, "locked": { - "lastModified": 1749944797, - "narHash": "sha256-1l6ZW+2+LDQhYgE4fo2KsM2Ms3lY3ZXv0n6uKka2yMk=", + "lastModified": 1755229570, + "narHash": "sha256-soZegto0xXzG2zYlu/zjknDHv0Z7tRS5EQs+Z/VRTBg=", "owner": "nix-community", "repo": "home-manager", - "rev": "c5f345153397f62170c18ded1ae1f0875201d49a", + "rev": "11626a4383b458f8dc5ea3237eaa04e8ab1912f3", "type": "github" }, "original": { @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1748955242, - "narHash": "sha256-fO0lSogrPRCMhjboUNKDzkeSoU1+Vo8DjfNof7QCw80=", + "lastModified": 1755246866, + "narHash": "sha256-GFP/HgnF3DVIFj9ijRnlkLBONd5hcojAjBnPn0o1qBI=", "owner": "ryanccn", "repo": "moldau", - "rev": "4fdf575e56a9e09161d09da060321bffac4607e0", + "rev": "a1c05ecb8f7bebae83261759e376e80f4ca1043d", "type": "github" }, "original": { @@ -147,11 +147,11 @@ ] }, "locked": { - "lastModified": 1749873626, - "narHash": "sha256-1Mc/D/1RwwmDKY59f4IpDBgcQttxffm+4o0m67lQ8hc=", + "lastModified": 1751313918, + "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "2f140d6ac8840c6089163fb43ba95220c230f22b", + "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", "type": "github" }, "original": { @@ -167,11 +167,11 @@ ] }, "locked": { - "lastModified": 1749355504, - "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", + "lastModified": 1754800038, + "narHash": "sha256-UbLO8/0pVBXLJuyRizYOJigtzQAj8Z2bTnbKSec/wN0=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", + "rev": "b65f8d80656f9fcbd1fecc4b7f0730f468333142", "type": "github" }, "original": { @@ -182,11 +182,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1749871736, - "narHash": "sha256-K9yBph93OLTNw02Q6e9CYFGrUhvEXnh45vrZqIRWfvQ=", + "lastModified": 1755175540, + "narHash": "sha256-V0j2S1r25QnbqBLzN2Rg/dKKil789bI3P3id7bDPVc4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6afe187897bef7933475e6af374c893f4c84a293", + "rev": "a595dde4d0d31606e19dcec73db02279db59d201", "type": "github" }, "original": { @@ -203,11 +203,11 @@ ] }, "locked": { - "lastModified": 1747309661, - "narHash": "sha256-p/+O/WK2yd/RvmFNA52e9VZRczSrgB8DNzghw/1nVPM=", + "lastModified": 1751032768, + "narHash": "sha256-RBKFDm6MpK2lDCUvbX0EFEuOASKtHM+5QknWM0A6AKE=", "owner": "ryanccn", "repo": "nrr", - "rev": "76f0d1097efc76b29b3be3dcc60cd47fb3acbf65", + "rev": "4da425b64c46eae492e87a30ddee6952835da046", "type": "github" }, "original": { @@ -261,11 +261,11 @@ ] }, "locked": { - "lastModified": 1749868581, - "narHash": "sha256-oWO5KAIjhclLwYJp7kJiNbNqCcZo8ZLuKQEJd9WL6r4=", + "lastModified": 1755225702, + "narHash": "sha256-i7Rgs943NqX0RgQW0/l1coi8eWBj3XhxVggMpjjzTsk=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "2ff6d56a67d75559f7b5d9edf9aa1fcf8e15f461", + "rev": "4abaeba6b176979be0da0195b9e4ce86bc501ae4", "type": "github" }, "original": { diff --git a/systems/caladan/homebrew.nix b/systems/caladan/homebrew.nix index 2398baa..276387a 100644 --- a/systems/caladan/homebrew.nix +++ b/systems/caladan/homebrew.nix @@ -27,19 +27,8 @@ "pandoc" ]; - casks = - let - noQuarantine = name: { - inherit name; - args = { - no_quarantine = true; - }; - }; - in - [ - "blackhole-16ch" - (noQuarantine "librewolf") - (noQuarantine "eloston-chromium") - ]; + casks = [ + "blackhole-16ch" + ]; }; } diff --git a/systems/caladan/nix.nix b/systems/caladan/nix.nix index 7570ddf..2392ce6 100644 --- a/systems/caladan/nix.nix +++ b/systems/caladan/nix.nix @@ -47,4 +47,8 @@ config.allowUnfree = true; hostPlatform = "aarch64-darwin"; }; + + environment.variables = { + NIX_INSTALLER_DIAGNOSTIC_ENDPOINT = ""; + }; } diff --git a/systems/caladan/packages.nix b/systems/caladan/packages.nix index b403d54..9ba8922 100644 --- a/systems/caladan/packages.nix +++ b/systems/caladan/packages.nix @@ -22,7 +22,7 @@ in nix-melt fnm - # deno (hydra build failure) + deno bun uv diff --git a/users/ryan/apps/vscode.nix b/users/ryan/apps/vscode.nix index b5266e9..d85ec6d 100644 --- a/users/ryan/apps/vscode.nix +++ b/users/ryan/apps/vscode.nix @@ -112,6 +112,7 @@ in "git.suggestSmartCommit" = false; "git.branchRandomName.enable" = true; "git.blame.editorDecoration.enabled" = true; + "git.useIntegratedAskPass" = false; "diffEditor.renderSideBySide" = false; "diffEditor.ignoreTrimWhitespace" = false; @@ -122,6 +123,7 @@ in "editor.lineHeight" = 1.5; # "editor.cursorBlinking" = "phase"; # "editor.cursorSmoothCaretAnimation" = "on"; + "editor.minimap.enabled" = false; # "editor.minimap.renderCharacters" = false; "workbench.editor.highlightModifiedTabs" = true; "workbench.editor.empty.hint" = "hidden"; diff --git a/users/ryan/default.nix b/users/ryan/default.nix index d5c82cd..5adf337 100644 --- a/users/ryan/default.nix +++ b/users/ryan/default.nix @@ -11,7 +11,7 @@ imports = [ inputs.catppuccin.homeModules.catppuccin - inputs.nix-index-database.hmModules.nix-index + inputs.nix-index-database.homeModules.nix-index ./variables.nix ./fonts.nix diff --git a/users/ryan/programs/aliases.nix b/users/ryan/programs/aliases.nix deleted file mode 100644 index 5b29510..0000000 --- a/users/ryan/programs/aliases.nix +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Ryan Cao -# -# SPDX-License-Identifier: Apache-2.0 - -{ - "g".command = "git"; - "j".command = "just"; - - "nb".command = "nix build"; - "nfu".command = "nix flake update"; - - "glol".command = - "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'"; - "glol".fishAlias = true; - - "ghrvw".command = "gh repo view --web"; - - "opr".command = "op run --env-file=.env.1password --"; - "dr".command = "doppler run --"; - - "dequarantine".command = "xattr -d com.apple.quarantine"; - - "bcpa".command = "brew cleanup --prune=all"; - "puil".command = "pnpm update --interactive --latest"; -} diff --git a/users/ryan/programs/fish.nix b/users/ryan/programs/fish.nix index bab7f79..cb108f9 100644 --- a/users/ryan/programs/fish.nix +++ b/users/ryan/programs/fish.nix @@ -2,22 +2,30 @@ # # SPDX-License-Identifier: Apache-2.0 -{ lib, ... }: -let - aliases = import ./aliases.nix; - - shellAbbrs = builtins.mapAttrs (lib.const (builtins.getAttr "command")) ( - lib.filterAttrs (_: a: !(lib.maybeAttr "fishAlias" false a)) aliases - ); - shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) ( - lib.filterAttrs (_: a: lib.maybeAttr "fishAlias" false a) aliases - ); -in { programs.fish = { enable = true; - inherit shellAbbrs shellAliases; + shellAbbrs = { + g = "git"; + j = "just"; + + nb = "nix build"; + nfu = "nix flake update"; + + glol = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'"; + ghrvw = "gh repo view --web"; + + opr = "op run --env-file=.env.1password --"; + dr = "doppler run --"; + + dequarantine = "xattr -d com.apple.quarantine"; + + bcpa = "brew cleanup --prune=all"; + puil = "pnpm update --interactive --latest"; + }; + + shellAliases = { }; shellInit = '' for config in ${./fish/configs}/*.fish diff --git a/users/ryan/programs/zsh.nix b/users/ryan/programs/zsh.nix index a90a8d2..6fb7b4f 100644 --- a/users/ryan/programs/zsh.nix +++ b/users/ryan/programs/zsh.nix @@ -2,9 +2,10 @@ # # SPDX-License-Identifier: Apache-2.0 -_: { +{ config, ... }: +{ programs.zsh = { enable = true; - dotDir = ".config/zsh"; + dotDir = "${config.xdg.configHome}/zsh"; }; }