1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 00:00:44 +01:00

chore: update, remove zsh configs

This commit is contained in:
Ryan Cao 2025-06-15 09:20:22 +08:00
parent e495878b0e
commit 79bc61a28e
Signed by: ryanccn
GPG key ID: F605AB4AF937D5D0
13 changed files with 58 additions and 180 deletions

View file

@ -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 }}

View file

@ -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'

View file

@ -5,7 +5,7 @@
{ self, ... }:
{
perSystem =
{ pkgs, config, ... }:
{ pkgs, ... }:
let
mkFlakeCheck =
args:

90
flake.lock generated
View file

@ -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",

View file

@ -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;
};
};
}

View file

@ -22,7 +22,7 @@ in
nix-melt
fnm
deno
# deno (hydra build failure)
bun
uv

View file

@ -8,14 +8,13 @@
...
}:
let
specialArgsModule = (
specialArgsModule =
{ pkgs, ... }:
{
_module.args = {
inputs' = withSystem pkgs.stdenvNoCC.hostPlatform.system (builtins.getAttr "inputs'");
};
}
);
};
in
{
flake.darwinConfigurations = {

View file

@ -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;
};
};
}

View file

@ -4,7 +4,7 @@
{
catppuccin = {
flavor = "frappe";
flavor = "macchiato";
accent = "sapphire";
bat.enable = true;

View file

@ -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

View file

@ -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;
}
];
};
}

View file

@ -1,27 +0,0 @@
# SPDX-FileCopyrightText: 2025 Ryan Cao <hello@ryanccn.dev>
#
# 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"

View file

@ -1,30 +0,0 @@
# SPDX-FileCopyrightText: 2025 Ryan Cao <hello@ryanccn.dev>
#
# 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"