mirror of
https://codeberg.org/hyperreal/home-manager
synced 2024-11-01 17:23:06 +01:00
Revert to older commit
This commit is contained in:
parent
0efecd739b
commit
94d1ced87a
@ -2,7 +2,38 @@
|
||||
|
||||
set shell := ["zsh", "-cu"]
|
||||
|
||||
go-tools:
|
||||
go install golang.org/x/tools/gpls@latest
|
||||
go install github.com/fatih/gomodifytags@latest
|
||||
go install github.com/cweill/gotests/...@latest
|
||||
go install github.com/x-motemen/gore/cmd/gore@latest
|
||||
go install golang.org/x/tools/cmd/guru@latest
|
||||
|
||||
python-tools:
|
||||
pipx install --include-deps ansible
|
||||
pipx install black
|
||||
pipx install nose
|
||||
pipx install pytest
|
||||
pipx install hyfetch
|
||||
pip install --user pyright
|
||||
|
||||
webdev-tools:
|
||||
sudo npm install -g @catppuccin/inkcat
|
||||
sudo npm install -g prettier
|
||||
sudo npm install -g js-beautify
|
||||
sudo npm install -g stylelint
|
||||
sudo dnf install -y tidy
|
||||
|
||||
rust-tools:
|
||||
source "${HOME}/.cargo/env"
|
||||
cargo install cargo-binstall
|
||||
cargo_pkgs=(arp-scan bandwhich bat diskonaut du-dust fblog fd hyperfine procs ripgrep skim vivid wthrr)
|
||||
for pkg in "${cargo_pkgs[@]}"; do cargo-binstall -y "$pkg"; done
|
||||
|
||||
refresh-doom-emacs:
|
||||
rm -rf "${HOME}/.config/emacs"
|
||||
git clone --depth 1 https://github.com/doomemacs/doomemacs "${HOME}/.config/emacs"
|
||||
"${HOME}/.config/emacs/bin/doom" install --force --verbose
|
||||
|
||||
rustup:
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
@ -1,115 +1,115 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
# Sets user-defined palette
|
||||
palette = "catppuccin_mocha"
|
||||
|
||||
## PROMPT FORMAT
|
||||
format = """$time$container$directory$all$cmd_duration$jobs$status$line_break$username$hostname$character"""
|
||||
format = """$time$container$directory$all$line_break$username$hostname$character"""
|
||||
right_format = """$cmd_duration$jobs$status"""
|
||||
|
||||
# # PALETTE
|
||||
palette = 'catppuccin_mocha'
|
||||
|
||||
[palettes.catppuccin_mocha]
|
||||
rosewater = '#f5e0dc'
|
||||
flamingo = '#f2cdcd'
|
||||
pink = '#f5c2e7'
|
||||
mauve = '#cba6f7'
|
||||
red = '#f38ba8'
|
||||
maroon = '#eba0ac'
|
||||
peach = '#fab387'
|
||||
yellow = '#f9e2af'
|
||||
green = '#a6e3a1'
|
||||
teal = '#94e2d5'
|
||||
sky = '#89dceb'
|
||||
sapphire = '#74c7ec'
|
||||
blue = '#89b4fa'
|
||||
lavender = '#b4befe'
|
||||
text = '#cdd6f4'
|
||||
subtext1 = '#bac2de'
|
||||
subtext0 = '#a6adc8'
|
||||
overlay2 = '#9399b2'
|
||||
overlay1 = '#7f849c'
|
||||
overlay0 = '#6c7086'
|
||||
surface2 = '#585b70'
|
||||
surface1 = '#45475a'
|
||||
surface0 = '#313244'
|
||||
base = '#1e1e2e'
|
||||
mantle = '#181825'
|
||||
crust = '#11111b'
|
||||
|
||||
## LEFT SIDE - FIRST LINE
|
||||
[time]
|
||||
disabled = false
|
||||
format = '[$time]($style) '
|
||||
time_format = '%T'
|
||||
style = 'bold peach'
|
||||
format = '[\[ $time \]]($style) '
|
||||
time_format = "%T"
|
||||
style = "bold peach"
|
||||
|
||||
[directory]
|
||||
style = 'subtext0'
|
||||
truncation_length = 8
|
||||
truncate_to_repo = true
|
||||
truncation_symbol = 'repo: '
|
||||
|
||||
[docker_context]
|
||||
symbol = 'docker: '
|
||||
format = '[$symbol$context]($style)'
|
||||
|
||||
[git_branch]
|
||||
symbol = ' '
|
||||
|
||||
[git_status]
|
||||
style = 'text'
|
||||
ahead = '⇡${count}'
|
||||
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
|
||||
behind = '⇣${count}'
|
||||
deleted = 'x'
|
||||
|
||||
[golang]
|
||||
symbol = 'go: '
|
||||
format = '[$symbol($version )($style)'
|
||||
|
||||
[nix_shell]
|
||||
symbol = 'nix: '
|
||||
format = '[$symbol$state(\($name\))]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = 'node: '
|
||||
format = '[$symbol($version)]($style)'
|
||||
|
||||
[python]
|
||||
symbol = 'py: '
|
||||
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = 'rust: '
|
||||
format = '[$symbol($version)]($style)'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 1
|
||||
style = 'yellow'
|
||||
format = 'duration: [$duration]($style) '
|
||||
disabled = false
|
||||
|
||||
[status]
|
||||
format = 'exit status: [$status = $common_meaning]($style) '
|
||||
disabled = false
|
||||
style = 'bold red'
|
||||
recognize_signal_code = true
|
||||
map_symbol = true
|
||||
|
||||
## LEFT SIDE - SECOND LINE
|
||||
[username]
|
||||
format = '[$user]($style)@'
|
||||
style_user = 'red'
|
||||
style_root = 'bold red'
|
||||
format = "[$user]($style)@"
|
||||
style_user = "red"
|
||||
style_root = "bold red"
|
||||
show_always = true
|
||||
|
||||
# Second param
|
||||
[hostname]
|
||||
format = '[$hostname]($style)'
|
||||
style = 'lavender'
|
||||
trim_at = '.local'
|
||||
format = "[$hostname]($style)"
|
||||
style = "lavender"
|
||||
trim_at = ".local"
|
||||
ssh_only = false
|
||||
disabled = false
|
||||
|
||||
# Third param
|
||||
[directory]
|
||||
style = "subtext0"
|
||||
truncation_length = 8
|
||||
truncate_to_repo = true
|
||||
truncation_symbol = "repo: "
|
||||
|
||||
# Before all the version info (python, nodejs, php, etc.)
|
||||
[git_status]
|
||||
style = "text"
|
||||
ahead = "⇡${count}"
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||
behind = "⇣${count}"
|
||||
deleted = "x"
|
||||
|
||||
[container]
|
||||
style = "bold pink"
|
||||
format = "[$symbol \\[ $name \\]]($style) "
|
||||
|
||||
# Last param in the first line/row
|
||||
[cmd_duration]
|
||||
min_time = 1
|
||||
style = "yellow"
|
||||
format = '\[duration: [$duration]($style)\] '
|
||||
disabled = false
|
||||
|
||||
# Prompt: param 2
|
||||
[character]
|
||||
format = ' [$symbol]($style) '
|
||||
format = '$symbol '
|
||||
success_symbol = ' [➜](bold teal)'
|
||||
error_symbol = ' [➜](bold red)'
|
||||
vimcmd_symbol = ' [V](bold green)'
|
||||
|
||||
# SYMBOLS
|
||||
[status]
|
||||
format = '\[exit status: [$status = $common_meaning]($style)\]'
|
||||
disabled = false
|
||||
style = "bold red"
|
||||
recognize_signal_code = true
|
||||
map_symbol = true
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[palettes.catppuccin_mocha]
|
||||
rosewater = "#f5e0dc"
|
||||
flamingo = "#f2cdcd"
|
||||
pink = "#f5c2e7"
|
||||
mauve = "#cba6f7"
|
||||
red = "#f38ba8"
|
||||
maroon = "#eba0ac"
|
||||
peach = "#fab387"
|
||||
yellow = "#f9e2af"
|
||||
green = "#a6e3a1"
|
||||
teal = "#94e2d5"
|
||||
sky = "#89dceb"
|
||||
sapphire = "#74c7ec"
|
||||
blue = "#89b4fa"
|
||||
lavender = "#b4befe"
|
||||
text = "#cdd6f4"
|
||||
subtext1 = "#bac2de"
|
||||
subtext0 = "#a6adc8"
|
||||
overlay2 = "#9399b2"
|
||||
overlay1 = "#7f849c"
|
||||
overlay0 = "#6c7086"
|
||||
surface2 = "#585b70"
|
||||
surface1 = "#45475a"
|
||||
surface0 = "#313244"
|
||||
base = "#1e1e2e"
|
||||
mantle = "#181825"
|
||||
crust = "#11111b"
|
||||
|
105
confs/zshrc
105
confs/zshrc
@ -1,105 +0,0 @@
|
||||
# Filename : ~/.zshrc
|
||||
# Purpose : setup file for zsh
|
||||
# Author : Jeffrey Serio <hyperreal@fedoraproject.org>
|
||||
# Homepage : https://hyperreal.coffee
|
||||
#
|
||||
# Zsh Manual - https://zsh-manual.netlify.app
|
||||
# Zsh Guide - https://zsh-guide.netlify.app
|
||||
|
||||
# Plugins
|
||||
if ! test -f "${HOME}/.zplug/init.zsh"; then
|
||||
export ZPLUG_HOME="${HOME}/.zplug"
|
||||
git clone https://github.com/zplug/zplug $ZPLUG_HOME
|
||||
fi
|
||||
|
||||
source "${HOME}/.zplug/init.zsh"
|
||||
|
||||
# Use autosuggestions when typing commands
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
|
||||
# Use a keybinding to complete parts of command from the history file
|
||||
zplug "zsh-users/zsh-history-substring-search"
|
||||
|
||||
# Use syntax highlighting when typing commands
|
||||
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
||||
|
||||
# Press escape twice to prepend `sudo` to the command line
|
||||
zplug "plugins/sudo", from:oh-my-zsh
|
||||
|
||||
# extract archives
|
||||
zplug "plugins/extract", from:oh-my-zsh
|
||||
|
||||
# systemd aliases
|
||||
zplug "plugins/systemd", from:oh-my-zsh
|
||||
|
||||
# Load file from ~/.zshrc.d
|
||||
zplug "${HOME}/.zshrc.d", from:local, use:'*'
|
||||
|
||||
if ! zplug check; then
|
||||
zplug install;
|
||||
exec $SHELL $SHELL_ARGS "$@"
|
||||
fi
|
||||
|
||||
zplug load
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ENVIRONMENT VARS
|
||||
# -----------------------------------------------------------------------------
|
||||
export DOOMDIR="${HOME}/shared/doom"
|
||||
export PATH="${HOME}/.config/emacs/bin:${PATH}"
|
||||
export LS_COLORS=$(vivid generate catppuccin-mocha)
|
||||
export PAGER="less -FRX"
|
||||
export MANWIDTH="88"
|
||||
export MANROFFOPT="-c"
|
||||
export MANPAGER="less -FRX"
|
||||
export BAT_PAGER="less -FRX"
|
||||
export BAT_STYLE="plain"
|
||||
|
||||
if test -x "$(command -v emacs)"; then
|
||||
EDITOR="emacsclient"
|
||||
else
|
||||
EDITOR="nvim"
|
||||
fi
|
||||
export EDITOR
|
||||
|
||||
# Have less display colours
|
||||
# from: https://wiki.archlinux.org/index.php/Color_output_in_console#man
|
||||
export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold
|
||||
export LESS_TERMCAP_md=$'\e[1;34m' # begin blink
|
||||
export LESS_TERMCAP_so=$'\e[01;0;33m' # begin reverse video
|
||||
export LESS_TERMCAP_us=$'\e[01;31m' # begin underline
|
||||
export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink
|
||||
export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
|
||||
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
|
||||
export GROFF_NO_SGR=1 # for konsole and gnome-terminal
|
||||
|
||||
# HISTSIZE is the number of lines of history that is kept within any given
|
||||
# running zsh instance. SAVEHIST is the number of lines of history that is
|
||||
# written out to the HISTFILE when that event occurs. If you use the
|
||||
# HIST_EXPIRE_DUPS_FIRST option, setting this value larger than the SAVEHIST
|
||||
# size will give you the difference as a cushion for saving duplicated history
|
||||
# events.
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=65536
|
||||
|
||||
# Name of the file used to store command history
|
||||
HISTFILE="${HOME}/.zsh_history"
|
||||
|
||||
# Language
|
||||
export LANG="en_US.UTF-8"
|
||||
|
||||
# Manpages
|
||||
export MANPATH="${MANPATH:-/usr/share/man:/usr/local/share/man}"
|
||||
|
||||
# Automatically remove duplicates from these arrays
|
||||
typeset -gU path cdpath manpath fpath
|
||||
|
||||
# compatibility with vterm-buffer-name-string in Emacs
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook -Uz chpwd() { print -Pn "\e]2;%m:%2~\a" }
|
||||
|
||||
# direnv
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
# starship.rs
|
||||
eval "$(starship init zsh)"
|
@ -1,115 +0,0 @@
|
||||
# Aliases for APT
|
||||
if [ -e "/etc/debian_version" ]; then
|
||||
alias acs="sudo apt-cache search"
|
||||
alias acp="sudo apt-cache policy"
|
||||
alias afs="sudo apt-file search"
|
||||
alias afu="sudo apt-file update"
|
||||
alias aac="sudo apt autoclean"
|
||||
alias agc="sudo apt clean"
|
||||
alias agi="sudo apt install"
|
||||
alias agli="sudo apt list --installed"
|
||||
alias agp="sudo apt purge"
|
||||
alias agr="sudo apt remove"
|
||||
alias agu="sudo apt update"
|
||||
alias agud="sudo apt update && sudo apt dist-upgrade"
|
||||
alias agar="sudo apt autoremove"
|
||||
fi
|
||||
|
||||
if [ -e "/etc/redhat-release" ]; then
|
||||
alias dnfc='sudo dnf clean all'
|
||||
alias dnfgi='sudo dnf groupinstall'
|
||||
alias dnfgl='dnf grouplist'
|
||||
alias dnfgr='sudo dnf groupremove'
|
||||
alias dnfi='sudo dnf install'
|
||||
alias dnfl='dnf list'
|
||||
alias dnfli='dnf list installed'
|
||||
alias dnfmc='dnf makecache'
|
||||
alias dnfp='dnf info'
|
||||
alias dnfr='sudo dnf remove'
|
||||
alias dnfs='dnf search'
|
||||
alias dnfu='sudo dnf update'
|
||||
fi
|
||||
|
||||
# The ls family
|
||||
if test -x "$(command -v eza)"; then
|
||||
alias ls='eza --git --icons'
|
||||
alias la='eza --git --icons -a'
|
||||
alias ll='eza --git --icons -l'
|
||||
alias lal='eza --git --icons -al'
|
||||
else
|
||||
alias ls='ls --color=auto'
|
||||
alias la='ls -a'
|
||||
alias ll='ls -l'
|
||||
alias lal='ls -al'
|
||||
fi
|
||||
|
||||
# grep
|
||||
alias grep='grep --color'
|
||||
|
||||
# Prompt user before overwriting files
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
alias rm='trash'
|
||||
alias del='/bin/rm -i'
|
||||
|
||||
# Display zsh functions with bat
|
||||
alias zfun='functions | bat -l zsh'
|
||||
|
||||
# Assorted global aliases
|
||||
alias -g H='| head'
|
||||
alias -g T='| tail'
|
||||
alias -g G='| grep'
|
||||
alias -g L='| less -FRX'
|
||||
alias -g B='| bat'
|
||||
alias -g J='| jq'
|
||||
alias -g CC='| wl-copy'
|
||||
alias -g C='| wc -l'
|
||||
|
||||
# Get public IP address
|
||||
alias pubip4='curl -s -m 5 ipv4.icanhazip.com'
|
||||
alias pubip6='curl -s -m 5 ipv6.icanhazip.com'
|
||||
|
||||
# List apps with network connections
|
||||
alias netcons='lsof -i'
|
||||
|
||||
# List ports
|
||||
alias tulp='ss -tulp'
|
||||
|
||||
# List open ports
|
||||
alias openports='sudo lsof -i | grep LISTEN'
|
||||
|
||||
# Ping google.com
|
||||
alias pong='ping -c 3 www.google.com'
|
||||
|
||||
# Ping alias
|
||||
alias ping='ping -c 3'
|
||||
|
||||
# List sockets in use
|
||||
alias lsock='sudo lsof -i -P'
|
||||
|
||||
# List UDP sockets in use
|
||||
alias lsocku='sudo lsof -nP | grep UDP'
|
||||
|
||||
# List TCP sockets in use
|
||||
alias lsockt='sudo lsof -nP | grep TCP'
|
||||
|
||||
# firewalld
|
||||
if test -x "$(command -v firewall-cmd)"; then
|
||||
alias fw='sudo firewall-cmd'
|
||||
alias fwp='sudo firewall-cmd --permanent'
|
||||
alias fwr='sudo firewall-cmd --reload'
|
||||
alias fwrp='sudo firewall-cmd --runtime-to-permanent'
|
||||
fi
|
||||
|
||||
# git
|
||||
alias ga='git add'
|
||||
alias gcl='git clone'
|
||||
alias gcmsg='git commit -m'
|
||||
alias gd='git diff'
|
||||
alias gl='git pull'
|
||||
alias gp='git push'
|
||||
alias gr='git remote'
|
||||
alias grbi='git rebase -i'
|
||||
alias grm='git rm'
|
||||
alias grv='git remote -v'
|
||||
alias gst='git status'
|
@ -1,37 +0,0 @@
|
||||
typeset -g -A key
|
||||
|
||||
key[Home]="${terminfo[khome]}"
|
||||
key[End]="${terminfo[kend]}"
|
||||
|
||||
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
|
||||
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
|
||||
|
||||
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
||||
autoload -Uz add-zle-hook-widget
|
||||
function zle_application_mode_start { echoti smkx }
|
||||
function zle_application_mode_stop { echoti rmkx }
|
||||
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
|
||||
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
|
||||
fi
|
||||
|
||||
## keybinding for convenient viewing of man pages
|
||||
if test -x "${HOME}/bin/split-man"; then
|
||||
split-man-widget() { "${HOME}/bin/split-man"}
|
||||
zle -N split-man-widget
|
||||
|
||||
bindkey '^[m' split-man-widget
|
||||
fi
|
||||
|
||||
## gumssh
|
||||
if test -x "$(command -v gumssh)"; then
|
||||
bindkey -s '^[s' 'gumssh^M'
|
||||
fi
|
||||
|
||||
## yazi
|
||||
if test -x "$(command -v yazi)"; then
|
||||
bindkey -s '^[f' 'yazi^M'
|
||||
fi
|
||||
|
||||
## history substring search
|
||||
bindkey '^[[1;5A' history-substring-search-up
|
||||
bindkey '^[[1;5B' history-substring-search-down
|
@ -58,18 +58,12 @@ function rmknownhosts() {
|
||||
}
|
||||
|
||||
# Empty trash
|
||||
function trsh() {
|
||||
function rubbish() {
|
||||
if check_cmd trash-empty; then
|
||||
trash-empty -f
|
||||
trash-empty
|
||||
fi
|
||||
}
|
||||
|
||||
# Copy SSH public key to clipboard (requires wl-copy)
|
||||
function pubkey() {
|
||||
cat "${HOME}/.ssh/id_ed25519.pub" | tr -d '\n' | wl-copy
|
||||
echo "--> SSH public key copied to clipboard"
|
||||
}
|
||||
|
||||
# Compatibility with emacs-libvterm
|
||||
function vterm_printf() {
|
||||
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then
|
||||
@ -83,12 +77,12 @@ function vterm_printf() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove all .jpeg .jpg .png .svg .webp files from downloads
|
||||
# Remove all .jpeg .jpg .png .svg files from downloads
|
||||
function rmpics() {
|
||||
find "${HOME}/downloads" \
|
||||
-maxdepth 1 \
|
||||
-type f \
|
||||
\( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" -o -name "*.webp"\) \
|
||||
\( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" \) \
|
||||
-delete
|
||||
}
|
||||
|
||||
|
@ -1,151 +0,0 @@
|
||||
## General shell options
|
||||
# See https://zsh-manual.netlify.app/options
|
||||
|
||||
# This is a multiple move based on zsh pattern matching (like "mmv").
|
||||
# Read ``less ${^fpath}/zmv(N)'' for more details.
|
||||
autoload zmv
|
||||
|
||||
# A builtin that can clone a running shell onto another terminal.
|
||||
zmodload -e zsh/clone
|
||||
|
||||
# When listing options (by 'setopt', 'unsetopt', 'set -o', or 'set +o'),
|
||||
# those turned on by default appear in the list prefixed with 'no'.
|
||||
# Hence (unless KSH_OPTION_PRINT is set), 'setopt' shows all options whose
|
||||
# settings are changed from default.
|
||||
#
|
||||
# Report the status of background jobs immediately, rather than waiting until
|
||||
# just before printing a prompt.
|
||||
setopt notify
|
||||
|
||||
# Allow comments even in interactive shells.
|
||||
setopt interactivecomments
|
||||
|
||||
# Send *not* a HUP signal to running jobs when the shell exits.
|
||||
setopt nohup
|
||||
|
||||
# If a pattern for filename generation has no matches, delete the pattern from
|
||||
# the argument list instead of reporting an error.
|
||||
# Overrides NOMATCH
|
||||
setopt nullglob
|
||||
|
||||
# Perform =filename access
|
||||
# $ setopt EQUALS
|
||||
# $ echo =ls
|
||||
# /bin/ls
|
||||
# $ unsetopt EQUALS
|
||||
# $ echo =ls
|
||||
# =ls
|
||||
# NOTE: It's not really needed because zsh sets the per default.
|
||||
setopt equals
|
||||
|
||||
# Try to make completion list smaller by printing the matches in columns with
|
||||
# different widths.
|
||||
setopt list_packed
|
||||
|
||||
# Expands single letters and ranges of letters between braces
|
||||
# $ print 1{abw-z}2
|
||||
# $ 1a2 1b2 1w2 1y2 1z2
|
||||
setopt braceccl
|
||||
|
||||
# If the argument to a cd command (or an implied cd with the AUTO_CD option
|
||||
# set) is not a directory, and does not begin with a slash, try to expand the
|
||||
# expression as if it were preceded by a '~' (See section 14.7 Filename
|
||||
# Expansion).
|
||||
setopt cdablevars
|
||||
|
||||
# Report the status of background and suspended jobs before exiting a shell
|
||||
# with job control; a second attempt to exit the shell will succeed.
|
||||
setopt checkjobs
|
||||
|
||||
# Make cd push the old directory onto the directory stack.
|
||||
setopt autopushd
|
||||
|
||||
# Change to directory without cd
|
||||
setopt autocd
|
||||
|
||||
# Query the user before executing 'rm *' or 'rm path/*'
|
||||
setopt normstarsilent
|
||||
setopt no_rm_star_wait
|
||||
|
||||
# Shaddapa you face
|
||||
setopt nobeep
|
||||
|
||||
# When writing out the history file, older commands that duplicate newer ones
|
||||
# are omitted.
|
||||
set histsavenodups
|
||||
|
||||
# When searching for history entries in the line editor, do not display
|
||||
# duplicates of a line previously found, even if the duplicates are not
|
||||
# contiguous.
|
||||
setopt histfindnodups
|
||||
|
||||
# If the internal history needs to be trimmed to add the current command line,
|
||||
# setting this option will cause the oldest history event that has a duplicate
|
||||
# to be lost before losing a unique event from the list.
|
||||
setopt hist_expire_dups_first
|
||||
|
||||
# If a new command line being added to the history list duplicates an older
|
||||
# one, the older command is removed from the list (even if it is not the
|
||||
# previous event).
|
||||
setopt hist_ignore_all_dups
|
||||
|
||||
# Do not enter command lines into the history list if they are duplicates of
|
||||
# the previous event.
|
||||
setopt hist_ignore_dups
|
||||
|
||||
# Remove superfluous blanks from each command line being added to history.
|
||||
setopt hist_reduce_blanks
|
||||
|
||||
# Whenever the user enters a line with history expansion, don't execute the
|
||||
# line directly; instead, perform history expansion and reload the line into
|
||||
# the editing buffer.
|
||||
setopt hist_verify
|
||||
|
||||
# Do not remove function definitions from the history list.
|
||||
unsetopt hist_no_functions
|
||||
|
||||
# Remove the history (fc -l) command from the history list when invoked.
|
||||
# Note that the command lingers in the internal history until the next command
|
||||
# is entered before it vanishes, allowing you to briefly reuse or edit the
|
||||
# line.
|
||||
setopt hist_no_store
|
||||
|
||||
# If this is set, zsh sessions will append their history list to the history
|
||||
# file, rather than overwrite it. Thus, multiple parallel zsh sessions will all
|
||||
# have their history lists added to the history file, in the order they are
|
||||
# killed.
|
||||
setopt appendhistory
|
||||
|
||||
# If unset, the cursor is set to the end of the word if completion is started.
|
||||
# Otherwise, it stays there and completion is done from both ends.
|
||||
unsetopt completeinword
|
||||
|
||||
# When listing files that are possible completions, show the type of each file
|
||||
# with a trailing identifying mark.
|
||||
setopt listtypes
|
||||
|
||||
# Do not require a leading '.' in a filename to be matched explicitly.
|
||||
setopt globdots
|
||||
|
||||
# List jobs in long format by default
|
||||
setopt longlistjobs
|
||||
|
||||
# Don't push multiple copies of the same directory onto the directory staack.
|
||||
setopt pushdignoredups
|
||||
|
||||
# This option both imports new commands from the history file, and also causes
|
||||
# your typed commands to be appended to the history file (the latter is like
|
||||
# specifying INC_APPEND_HISTORY).
|
||||
# The history lines are also output with timestamps ala EXTENDED_HISTORY
|
||||
# (which makes it easier to find the spot where we left off reading the file
|
||||
# after it gets re-written).
|
||||
setopt sharehistory
|
||||
|
||||
# Save each command's beginning timestamp (in seconds since the epoch)
|
||||
# and the duration (in seconds) to the history file. The format of this
|
||||
# prefixed data is:
|
||||
# ':<beginning time>:<elapsed seconds>;<command>'
|
||||
setopt extendedhistory
|
||||
|
||||
# Do *not* run all background jobs at a lower nice priority
|
||||
unsetopt bgnice
|
175
home.nix
175
home.nix
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config = {
|
||||
@ -41,7 +36,6 @@
|
||||
ripgrep
|
||||
starship
|
||||
tealdeer
|
||||
trash-cli
|
||||
vivid
|
||||
wl-clipboard
|
||||
wthrr
|
||||
@ -57,7 +51,6 @@
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
".justfile".source = confs/justfile;
|
||||
".zshrc".source = confs/zshrc;
|
||||
".zshrc.d".source = confs/zshrc.d;
|
||||
".doom.d/config.el".source = doom.d/config.el;
|
||||
".doom.d/init.el".source = doom.d/init.el;
|
||||
@ -90,6 +83,172 @@
|
||||
settings = lib.importTOML confs/starship.toml;
|
||||
};
|
||||
|
||||
# borgmatic
|
||||
services.borgmatic = {
|
||||
enable = true;
|
||||
frequency = "daily";
|
||||
};
|
||||
programs.borgmatic = {
|
||||
enable = true;
|
||||
backups.epool = {
|
||||
location = {
|
||||
repositories = [ "/epool/borgbackup/moonshadow" ];
|
||||
patterns = [
|
||||
"+ /home/jas"
|
||||
"- /home/jas/.cache"
|
||||
"- /home/jas/downloads"
|
||||
"- /home/jas/.local/share/containers"
|
||||
"- /home/jas/.config/emacs"
|
||||
];
|
||||
};
|
||||
retention = {
|
||||
keepDaily = 7;
|
||||
keepMonthly = 12;
|
||||
keepWeekly = 4;
|
||||
keepYearly = 4;
|
||||
};
|
||||
consistency.checks = [
|
||||
{
|
||||
name = "repository";
|
||||
frequency = "2 weeks";
|
||||
}
|
||||
{
|
||||
name = "archives";
|
||||
frequency = "4 weeks";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# zsh config
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
autocd = false;
|
||||
envExtra = ''
|
||||
export PATH="$HOME/bin:$HOME/.local/bin:/usr/sbin:$PATH"
|
||||
'';
|
||||
history = {
|
||||
extended = true;
|
||||
ignoreAllDups = false;
|
||||
ignoreDups = true;
|
||||
path = "${config.home.homeDirectory}/.zsh_history";
|
||||
save = 65536;
|
||||
share = false;
|
||||
size = 100000;
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
zplug.enable = true;
|
||||
zplug.plugins = [
|
||||
{
|
||||
name = "zsh-users/zsh-syntax-highlighting";
|
||||
tags = [ "defer:2" ];
|
||||
}
|
||||
{
|
||||
name = "plugins/sudo";
|
||||
tags = [ "from:oh-my-zsh" ];
|
||||
}
|
||||
{
|
||||
name = "plugins/extract";
|
||||
tags = [ "from:oh-my-zsh" ];
|
||||
}
|
||||
{
|
||||
name = "plugins/systemd";
|
||||
tags = [ "from:oh-my-zsh" ];
|
||||
}
|
||||
{
|
||||
name = "${config.home.homeDirectory}/.zshrc.d";
|
||||
tags = [ "from:local" "use:'*'" ];
|
||||
}
|
||||
];
|
||||
shellAliases = {
|
||||
acs = "sudo apt-cache search $@";
|
||||
acp = "sudo apt-cache policy $@";
|
||||
afs = "sudo apt-file search $@";
|
||||
afu = "sudo apt-file update";
|
||||
agi = "sudo apt install $@";
|
||||
agp = "sudo apt purge $@";
|
||||
agr = "sudo apt remove $@";
|
||||
agu = "sudo apt update";
|
||||
agud = "sudo apt update && sudo apt dist-upgrade";
|
||||
agar = "sudo apt autoremove";
|
||||
ls = "eza --git --icons $@";
|
||||
la = "eza --git --icons -a $@";
|
||||
lal = "eza --git --icons -al $@";
|
||||
ll = "eza --git --icons -l $@";
|
||||
grep = "rg $@";
|
||||
df = "duf $@";
|
||||
cp = "cp -i $@";
|
||||
rm = "trash $@";
|
||||
del = "/bin/rm -i $@";
|
||||
mv = "mv -i $@";
|
||||
zfun = "functions | bat -l zsh";
|
||||
pubip4 = "curl -s -m 5 ipv4.icanhazip.com";
|
||||
pubip6 = "curl -s -m 5 ipv6.icanhazip.com";
|
||||
netcons = "lsof -i";
|
||||
tulp = "ss -tulp";
|
||||
openports = "sudo lsof -i | grep LISTEN";
|
||||
pong = "ping -c 3 www.google.com";
|
||||
lsock = "sudo lsof -i -P";
|
||||
lsocku = "sudo lsof -nP | grep UDP";
|
||||
lsockt = "sudo lsof -nP | grep TCP";
|
||||
fw = "sudo firewall-cmd $@";
|
||||
fwr = "sudo firewall-cmd --reload";
|
||||
fwp = "sudo firewall-cmd --permanent $@";
|
||||
ga = "git add $@";
|
||||
gcl = "git clone $@";
|
||||
gcmsg = "git commit -m $@";
|
||||
gd = "git diff";
|
||||
gp = "git push $@";
|
||||
grm = "git rm $@";
|
||||
grv = "git remote -v";
|
||||
gst = "git status";
|
||||
doomdoc = "\${xdg.configHome}/emacs/bin/doom doctor";
|
||||
dsync = "\${xdg.configHome}/emacs/bin/doom sync";
|
||||
dclean = "\${xdg.configHome}/emacs/bin/doom clean";
|
||||
dgc = "\${xdg.configHome}/emacs/bin/doom gc";
|
||||
dupgrade = "\${xdg.configHome}/emacs/bin/doom upgrade";
|
||||
pubkey = "cat ${config.home.homeDirectory}/.ssh/id_ed25519.pub | tr -d '\n' | wl-copy";
|
||||
};
|
||||
shellGlobalAliases = {
|
||||
G = "| grep";
|
||||
J = "| jq";
|
||||
CC = "| wl-copy";
|
||||
H = "| head";
|
||||
T = "| tail";
|
||||
L = "| less -RFX";
|
||||
C = "| wc -l";
|
||||
B = "| bat";
|
||||
};
|
||||
sessionVariables = {
|
||||
PAGER = "less -RFX";
|
||||
MANWIDTH = "88";
|
||||
MANROFFOPT = "-c";
|
||||
MANPAGER = "less -RFX";
|
||||
EDITOR = "emacsclient";
|
||||
GROFF_NO_SGR = 1;
|
||||
BAT_PAGER = "less -RFX";
|
||||
BAT_STYLE = "plain";
|
||||
};
|
||||
initExtraFirst = ''
|
||||
export LS_COLORS=$(vivid generate catppuccin-mocha)
|
||||
export LESS_TERMCAP_mb=$'\e[1;31m'
|
||||
export LESS_TERMCAP_md=$'\e[1;34m'
|
||||
export LESS_TERMCAP_so=$'\e[01;0;33m'
|
||||
export LESS_TERMCAP_us=$'\e[01;31m'
|
||||
export LESS_TERMCAP_me=$'\e[0m'
|
||||
export LESS_TERMCAP_se=$'\e[0m'
|
||||
export LESS_TERMCAP_ue=$'\e[0m'
|
||||
if test -x ${config.home.homeDirectory}/bin/gumssh; then bindkey -s '^[s' 'gumssh^M'; fi
|
||||
bindkey -s '^[f' 'yazi^M'
|
||||
'';
|
||||
initExtra = ''
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(starship init zsh)"
|
||||
'';
|
||||
};
|
||||
|
||||
# neovim
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user