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

refactor: add lots of programs

This commit is contained in:
Ryan Cao 2024-01-18 14:45:11 +08:00
parent 661ff3f1a0
commit da6ce75ba9
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
14 changed files with 99 additions and 82 deletions

11
home/programs/direnv.nix Normal file
View file

@ -0,0 +1,11 @@
_: {
programs.direnv = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
# enableFishIntegration = true;
nix-direnv.enable = true;
};
}

View file

@ -4,9 +4,6 @@ set -x LS_COLORS (vivid generate catppuccin-frappe)
# 1Password SSH
set -x SSH_AUTH_SOCK "$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
# Homebrew
/opt/homebrew/bin/brew shellenv | source
# Nix
fish_add_path -Pm /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin

View file

@ -1,18 +1,7 @@
if status is-interactive
# starship
starship init fish | source
# zoxide
zoxide init fish | source
# direnv
direnv hook fish | source
# nix-your-shell
nix-your-shell fish | source
set -x FZF_DEFAULT_OPTS " \
--color=bg+:#414559,bg:#303446,spinner:#f2d5cf,hl:#e78284 \
--color=fg:#c6d0f5,header:#e78284,info:#ca9ee6,pointer:#f2d5cf \
--color=marker:#f2d5cf,fg+:#c6d0f5,prompt:#ca9ee6,hl+:#e78284"
if test -e "$HOME/.iterm2_shell_integration.fish"
source "$HOME/.iterm2_shell_integration.fish"
end

24
home/programs/fzf.nix Normal file
View file

@ -0,0 +1,24 @@
_: {
programs.fzf = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
colors = {
"bg+" = "#414559";
bg = "#303446";
"fg+" = "#c6d0f5";
fg = "#c6d0f5";
"hl+" = "#e78284";
hl = "#e78284";
spinner = "#f2d5cf";
header = "#e78284";
info = "#ca9ee6";
pointer = "#f2d5cf";
marker = "#f2d5cf";
prompt = "#ca9ee6";
};
};
}

View file

@ -1,6 +1,11 @@
_: {
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
settings = {
command_timeout = 1000;

View file

@ -0,0 +1,9 @@
_: {
programs.tealdeer = {
enable = true;
settings = {
display.compact = true;
updates.auto_update = true;
};
};
}

9
home/programs/zoxide.nix Normal file
View file

@ -0,0 +1,9 @@
_: {
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
};
}

View file

@ -14,7 +14,7 @@ in {
syntaxHighlighting.enable = true;
envExtra = builtins.readFile ./zsh/envExtra.zsh;
initExtraBeforeCompInit = builtins.readFile ./zsh/initExtraBeforeCompInit.zsh;
# initExtraBeforeCompInit = builtins.readFile ./zsh/initExtraBeforeCompInit.zsh;
initExtra = builtins.readFile ./zsh/initExtra.zsh;
inherit shellAliases;

View file

@ -1,9 +1,6 @@
# 1Password SSH
export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
# Homebrew shell
eval "$(/opt/homebrew/bin/brew shellenv)"
# fnm shell env
eval "$(fnm env --use-on-cd)"

View file

@ -1,9 +1,3 @@
# environment variables
export FZF_DEFAULT_OPTS=" \
--color=bg+:#414559,bg:#303446,spinner:#f2d5cf,hl:#e78284 \
--color=fg:#c6d0f5,header:#e78284,info:#ca9ee6,pointer:#f2d5cf \
--color=marker:#f2d5cf,fg+:#c6d0f5,prompt:#ca9ee6,hl+:#e78284"
# zsh options
setopt interactivecomments
unsetopt menu_complete
@ -34,18 +28,6 @@ function clean_vscode_workspace_storage() {
done
}
# starship
eval "$(starship init zsh)"
# fzf
# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# zoxide
eval "$(zoxide init zsh)"
# direnv
command -v direnv &> /dev/null && eval "$(direnv hook zsh)"
# nix-your-shell
eval "$(nix-your-shell zsh)"

View file

@ -1,5 +0,0 @@
if command -v brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:$FPATH"
fi
FPATH="$HOME/.zfunc:$FPATH"