diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59d675c..c881fe3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: persist-credentials: false - name: Install Nix - uses: cachix/install-nix-action@d1ca217b388ee87b2507a9a93bf01368bde7cec2 # ratchet:cachix/install-nix-action@v31 + uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # ratchet:cachix/install-nix-action@v31 - name: Build run: nix build -L --show-trace .#${{ matrix.attr }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8c39c6a..3045546 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,7 +24,7 @@ jobs: persist-credentials: false - name: Install Nix - uses: cachix/install-nix-action@d1ca217b388ee87b2507a9a93bf01368bde7cec2 # ratchet:cachix/install-nix-action@v31 + uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # ratchet:cachix/install-nix-action@v31 - name: Check run: nix build --print-build-logs '.#checks.x86_64-linux.nixfmt' @@ -39,7 +39,7 @@ jobs: persist-credentials: false - name: Install Nix - uses: cachix/install-nix-action@d1ca217b388ee87b2507a9a93bf01368bde7cec2 # ratchet:cachix/install-nix-action@v31 + uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # ratchet:cachix/install-nix-action@v31 - name: Check run: nix build --print-build-logs '.#checks.x86_64-linux.reuse' diff --git a/checks/default.nix b/checks/default.nix index ab4380a..23c6724 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -5,7 +5,7 @@ { self, ... }: { perSystem = - { pkgs, config, ... }: + { pkgs, ... }: let mkFlakeCheck = args: diff --git a/flake.lock b/flake.lock index c02bea7..5fbe07b 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1748505140, - "narHash": "sha256-RO5inKcQEZLlS/JdsLspct8zE7OUXmwgzezuTea4Ro4=", + "lastModified": 1749293437, + "narHash": "sha256-yeuIxXfkUnkGBxkXIiRfCjW7XiiWxWV+PZoCkCRyu8c=", "owner": "ryanccn", "repo": "arkencrab", - "rev": "cd226a6171898761f2ccf7111ae0a42a390029c4", + "rev": "aaa30d257d40ecace18693369cab554c61a2841b", "type": "github" }, "original": { @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1748080874, - "narHash": "sha256-sUebEzAkrY8Aq5G0GHFyRddmRNGP/a2iTtV7ISNvi/c=", + "lastModified": 1749223974, + "narHash": "sha256-/GAQYRW1duU81KG//2wI9ax8EkHVG/e1UOD97NdwLOY=", "owner": "catppuccin", "repo": "nix", - "rev": "0ba11b12be81f0849a89ed17ab635164ea8f0112", + "rev": "3a42cd79c647360ee8742659e42aeec0947dd3b4", "type": "github" }, "original": { @@ -67,11 +67,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -87,11 +87,11 @@ ] }, "locked": { - "lastModified": 1748570847, - "narHash": "sha256-XU1a6wFctd+s3ZvBIFB6s4GhPJ+Oc6pkeOrEsbA2fMo=", + "lastModified": 1749944797, + "narHash": "sha256-1l6ZW+2+LDQhYgE4fo2KsM2Ms3lY3ZXv0n6uKka2yMk=", "owner": "nix-community", "repo": "home-manager", - "rev": "4e9efaa68b0be7e19127dad4f0506a9b89e28ef4", + "rev": "c5f345153397f62170c18ded1ae1f0875201d49a", "type": "github" }, "original": { @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1746267775, - "narHash": "sha256-/noXgOMDHfVvGaF48TmMv0o9QwMxZLYyMgpyn89RNdI=", + "lastModified": 1748955242, + "narHash": "sha256-fO0lSogrPRCMhjboUNKDzkeSoU1+Vo8DjfNof7QCw80=", "owner": "ryanccn", "repo": "moldau", - "rev": "447b391b9bc04ce9437cd0171db267b5d6c3f0e6", + "rev": "4fdf575e56a9e09161d09da060321bffac4607e0", "type": "github" }, "original": { @@ -147,11 +147,11 @@ ] }, "locked": { - "lastModified": 1748352827, - "narHash": "sha256-sNUUP6qxGkK9hXgJ+p362dtWLgnIWwOCmiq72LAWtYo=", + "lastModified": 1749873626, + "narHash": "sha256-1Mc/D/1RwwmDKY59f4IpDBgcQttxffm+4o0m67lQ8hc=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "44a7d0e687a87b73facfe94fba78d323a6686a90", + "rev": "2f140d6ac8840c6089163fb43ba95220c230f22b", "type": "github" }, "original": { @@ -167,11 +167,11 @@ ] }, "locked": { - "lastModified": 1748145500, - "narHash": "sha256-t9fx0l61WOxtWxXCqlXPWSuG/0XMF9DtE2T7KXgMqJw=", + "lastModified": 1749355504, + "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "a98adbf54d663395df0b9929f6481d4d80fc8927", + "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", "type": "github" }, "original": { @@ -182,11 +182,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748506378, - "narHash": "sha256-oS0Gxh63Df8b8r04lqEYDDLKhHIrVr9/JLOn2bn8JaI=", + "lastModified": 1749871736, + "narHash": "sha256-K9yBph93OLTNw02Q6e9CYFGrUhvEXnh45vrZqIRWfvQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3866ad91cfc172f08a6839def503d8fc2923c603", + "rev": "6afe187897bef7933475e6af374c893f4c84a293", "type": "github" }, "original": { @@ -236,22 +236,6 @@ "type": "github" } }, - "ohmyzsh": { - "flake": false, - "locked": { - "lastModified": 1748515796, - "narHash": "sha256-rjN+/5P/q7uXSVGf/jypOCYLvoGYGPMZTy1dL9+E4Uc=", - "owner": "ohmyzsh", - "repo": "ohmyzsh", - "rev": "95ef2516697aa764d1d4bb93ad3490584cc118ec", - "type": "github" - }, - "original": { - "owner": "ohmyzsh", - "repo": "ohmyzsh", - "type": "github" - } - }, "root": { "inputs": { "am": "am", @@ -266,10 +250,8 @@ "nixpkgs": "nixpkgs", "nrr": "nrr", "nyoom": "nyoom", - "ohmyzsh": "ohmyzsh", "rust-overlay": "rust-overlay", - "spdx-gen": "spdx-gen", - "vivid-zsh": "vivid-zsh" + "spdx-gen": "spdx-gen" } }, "rust-overlay": { @@ -279,11 +261,11 @@ ] }, "locked": { - "lastModified": 1748572605, - "narHash": "sha256-k0nhPtkVDQkVJckRw6fGIeeDBktJf1BH0i8T48o7zkk=", + "lastModified": 1749868581, + "narHash": "sha256-oWO5KAIjhclLwYJp7kJiNbNqCcZo8ZLuKQEJd9WL6r4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "405ef13a5b80a0a4d4fc87c83554423d80e5f929", + "rev": "2ff6d56a67d75559f7b5d9edf9aa1fcf8e15f461", "type": "github" }, "original": { @@ -311,22 +293,6 @@ "repo": "spdx-gen", "type": "github" } - }, - "vivid-zsh": { - "flake": false, - "locked": { - "lastModified": 1723631050, - "narHash": "sha256-C+ASKsQ8dttn+FjgzEYtQnuTslkKU78Dbspj95E0cMs=", - "owner": "ryanccn", - "repo": "vivid-zsh", - "rev": "55def93e57fc083d9c40a653f9e27e97a453588d", - "type": "github" - }, - "original": { - "owner": "ryanccn", - "repo": "vivid-zsh", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index aefc32a..df35363 100644 --- a/flake.nix +++ b/flake.nix @@ -89,15 +89,5 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; - - ohmyzsh = { - url = "github:ohmyzsh/ohmyzsh"; - flake = false; - }; - - vivid-zsh = { - url = "github:ryanccn/vivid-zsh"; - flake = false; - }; }; } diff --git a/systems/caladan/packages.nix b/systems/caladan/packages.nix index 9ba8922..b403d54 100644 --- a/systems/caladan/packages.nix +++ b/systems/caladan/packages.nix @@ -22,7 +22,7 @@ in nix-melt fnm - deno + # deno (hydra build failure) bun uv diff --git a/systems/default.nix b/systems/default.nix index 59e6ee9..0d71e53 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -8,14 +8,13 @@ ... }: let - specialArgsModule = ( + specialArgsModule = { pkgs, ... }: { _module.args = { inputs' = withSystem pkgs.stdenvNoCC.hostPlatform.system (builtins.getAttr "inputs'"); }; - } - ); + }; in { flake.darwinConfigurations = { diff --git a/users/ryan/apps/vscode.nix b/users/ryan/apps/vscode.nix index eadaeec..b5266e9 100644 --- a/users/ryan/apps/vscode.nix +++ b/users/ryan/apps/vscode.nix @@ -6,10 +6,18 @@ pkgs, lib, config, - # self, ... }: let + flavorName = + { + "latte" = "Latte"; + "frappe" = "Frappé"; + "macchiato" = "Macchiato"; + "mocha" = "Mocha"; + } + .${config.catppuccin.flavor}; + extensions = [ "astro-build.astro-vscode" "bierner.lit-html" @@ -78,8 +86,8 @@ in profiles.default.userSettings = builtins.foldl' lib.recursiveUpdate { } [ { - "workbench.colorTheme" = "Catppuccin Frappé"; - "workbench.iconTheme" = "catppuccin-frappe"; + "workbench.colorTheme" = "Catppuccin ${flavorName}"; + "workbench.iconTheme" = "catppuccin-${config.catppuccin.flavor}"; "workbench.sideBar.location" = "left"; "workbench.activityBar.location" = "top"; @@ -128,10 +136,16 @@ in "terminal.integrated.fontSize" = 14; "terminal.integrated.lineHeight" = 1.5; "terminal.integrated.cursorBlinking" = true; - "terminal.integrated.defaultProfile.osx" = "fish"; "terminal.integrated.inheritEnv" = false; "terminal.integrated.enablePersistentSessions" = false; "terminal.integrated.shellIntegration.enabled" = false; + "terminal.integrated.defaultProfile.osx" = "fish"; + "terminal.integrated.profiles.osx" = { + "fish" = { + "path" = "/run/current-system/sw/bin/fish"; + "args" = [ "-l" ]; + }; + }; "editor.defaultFormatter" = "esbenp.prettier-vscode"; @@ -187,7 +201,7 @@ in "nix.serverSettings" = { "nil" = { formatting.command = [ (lib.getExe pkgs.nixfmt-rfc-style) ]; - # nixpkgs.expr = "import (builtins.getFlake \"${self}\").inputs.nixpkgs { }"; + nix.flake.autoArchive = false; }; }; } diff --git a/users/ryan/catppuccin.nix b/users/ryan/catppuccin.nix index 9592ce7..382ea4e 100644 --- a/users/ryan/catppuccin.nix +++ b/users/ryan/catppuccin.nix @@ -4,7 +4,7 @@ { catppuccin = { - flavor = "frappe"; + flavor = "macchiato"; accent = "sapphire"; bat.enable = true; diff --git a/users/ryan/programs/fish/configs/01_tooling.fish b/users/ryan/programs/fish/configs/01_tooling.fish index 7a3c7ce..13482c0 100644 --- a/users/ryan/programs/fish/configs/01_tooling.fish +++ b/users/ryan/programs/fish/configs/01_tooling.fish @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 -set -x SSH_AUTH_SOCK "$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" -set -x LS_COLORS "$(vivid generate catppuccin-frappe)" +set -gx SSH_AUTH_SOCK "$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" +set -gx LS_COLORS "$(vivid generate catppuccin-macchiato)" /opt/homebrew/bin/brew shellenv | source diff --git a/users/ryan/programs/zsh.nix b/users/ryan/programs/zsh.nix index 116adc4..a90a8d2 100644 --- a/users/ryan/programs/zsh.nix +++ b/users/ryan/programs/zsh.nix @@ -2,43 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 -{ - config, - inputs, - lib, - ... -}: -let - shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (import ./aliases.nix); -in -{ +_: { programs.zsh = { enable = true; dotDir = ".config/zsh"; - - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - enableCompletion = true; - - envExtra = builtins.readFile ./zsh/envExtra.zsh; - initContent = builtins.readFile ./zsh/initExtra.zsh; - - inherit shellAliases; - - localVariables = { - vivid_theme = "catppuccin-${config.catppuccin.flavor}"; - }; - - plugins = [ - { - name = "ohmyzsh-macos"; - file = "plugins/macos/macos.plugin.zsh"; - src = inputs.ohmyzsh; - } - { - name = "vivid-zsh"; - src = inputs.vivid-zsh; - } - ]; }; } diff --git a/users/ryan/programs/zsh/envExtra.zsh b/users/ryan/programs/zsh/envExtra.zsh deleted file mode 100644 index 393ed62..0000000 --- a/users/ryan/programs/zsh/envExtra.zsh +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Ryan Cao -# -# SPDX-License-Identifier: Apache-2.0 - -# 1Password SSH -export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" - -# Homebrew -eval "$(/opt/homebrew/bin/brew shellenv)" - -# fnm shell env -eval "$(fnm env --use-on-cd)" - -# cargo -export PATH="$CARGO_HOME/bin:$PATH" -# go -export PATH="$GOPATH/bin:$PATH" - -# deno -export PATH="$HOME/.deno/bin:$PATH" - -# pnpm -export PNPM_HOME="${HOME}/Library/pnpm" -export PATH="$PNPM_HOME:$PATH" - -# local bin -export PATH="$HOME/.local/bin:$PATH" diff --git a/users/ryan/programs/zsh/initExtra.zsh b/users/ryan/programs/zsh/initExtra.zsh deleted file mode 100644 index 7317e03..0000000 --- a/users/ryan/programs/zsh/initExtra.zsh +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-FileCopyrightText: 2025 Ryan Cao -# -# SPDX-License-Identifier: Apache-2.0 - -# zsh options -setopt interactivecomments -unsetopt menu_complete -unsetopt flowcontrol -setopt auto_menu -setopt complete_in_word -setopt always_to_end - -export HISTFILE="$XDG_STATE_HOME"/zsh/history -compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" - -# configure completion styles -zstyle ':completion:*' menu select -zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" -zstyle ':completion:*' group-name \'\' - -function take() { - mkdir "$1" - cd "$1" || return 1 -} - -# nix-your-shell -eval "$(nix-your-shell zsh)" - -# Ghostty -[[ "$TERM_PROGRAM" == "ghostty" ]] && source "/Applications/Ghostty.app/Contents/Resources/ghostty/shell-integration/zsh/ghostty-integration"