treewide: remove some useless files

This commit is contained in:
Max Headroom 2024-07-06 22:55:09 +02:00
parent 8aaa15dd16
commit 7570369072
17 changed files with 0 additions and 430 deletions

3
.dvc/.gitignore vendored
View file

@ -1,3 +0,0 @@
/config.local
/tmp
/cache

View file

@ -1,5 +0,0 @@
[core]
remote = cdn
['remote "cdn"']
url = s3://content-delivery/assets
endpointurl = https://object-storage.privatevoid.net

View file

@ -1,3 +0,0 @@
# Add patterns of files dvc should ignore, which could improve
# the performance. Learn more at
# https://dvc.org/doc/user-guide/dvcignore

View file

@ -1,2 +0,0 @@
# works well enough
[[ "$TERM" == "linux" ]] && TERM=xterm-256color

View file

@ -1,4 +0,0 @@
zstyle ':completion:*' matcher-list '' \
'm:{a-z\-}={A-Z\_}' \
'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
'r:|?=** m:{a-z\-}={A-Z\_}'

View file

@ -1,31 +0,0 @@
# zsh-syntax-highlighting
typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[precommand]='fg=33'
ZSH_HIGHLIGHT_STYLES[arg0]='fg=39'
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=229'
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=228'
ZSH_HIGHLIGHT_STYLES[autodirectory]='fg=blue'
ZSH_HIGHLIGHT_STYLES[path]='none'
# HACK: performance fix assuming "none" isn't truly none
ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/*)
# fix aliased highlighting of suid precmds
typeset -A ZSH_HIGHLIGHT_PATTERNS
ZSH_HIGHLIGHT_PATTERNS+=('doas' 'fg=33')
ZSH_HIGHLIGHT_PATTERNS+=('sudo' 'fg=33')
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main pattern)
# set up LS_COLORS
if which dircolors >/dev/null 2>&1; then
export $(dircolors)
fi
# colorful tab completion listings
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"

View file

@ -1,7 +0,0 @@
HISTFILE=~/.cache/zsh_history
HISTSIZE=15000
SAVEHIST=10000
setopt share_history
setopt hist_expire_dups_first
setopt hist_no_functions hist_no_store hist_reduce_blanks
setopt hist_verify

View file

@ -1,38 +0,0 @@
# partial outtake from ohmyzsh lib/key-bindings.zsh
# https://github.com/ohmyzsh/ohmyzsh/pull/1355/files
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init() {
echoti smkx
}
function zle-line-finish() {
echoti rmkx
}
zle -N zle-line-init
zle -N zle-line-finish
fi
bindkey -e # Use emacs key bindings
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history
bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history
bindkey "${terminfo[kcuu1]}" history-substring-search-up
bindkey "${terminfo[kcud1]}" history-substring-search-down
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
bindkey ' ' magic-space # [Space] - do history expansion
bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word
bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word
bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Shift-Tab] - move through the completion menu backwards
bindkey '^?' backward-delete-char # [Backspace] - delete backward
bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward

View file

@ -1,2 +0,0 @@
bindkey ' ' magic-space
bindkey '^ ' autosuggest-accept

View file

@ -1,15 +0,0 @@
# allow using comments in interactive
setopt interactive_comments
# basic support for the omz theme format
setopt prompt_subst
# completions
autoload -U compinit
compinit
# allow fully dynamic alias completion - like it's supposed to be
unsetopt complete_aliases
setopt glob_complete
setopt glob_star_short
unsetopt bad_pattern

View file

@ -1,43 +0,0 @@
alias d="dirs -v | head -n10"
# backdir auto expansion: ... -> ../..
function rationalise-dot() {
local MATCH # keep the regex match from leaking to the environment
if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\.$' && ! $LBUFFER = p4* ]]; then
#if [[ ! $LBUFFER = p4* && $LBUFFER = *.. ]]; then
LBUFFER+=/..
else
zle self-insert
fi
}
zle -N rationalise-dot
bindkey . rationalise-dot
bindkey -M isearch . self-insert
# absolutize a relative path, or vice versa, or alternatively insert the cwd
function insert-cwd-or-absolute() {
local MATCH # keep the regex match from leaking to the environment
# match anything that could be a path
if [[ $LBUFFER =~ '(|'$'\n''|\||;|&)[^= ]+$' && ! $LBUFFER = p4* ]]; then
# make sure it exists
if [[ -e $MATCH ]]; then
local XMATCH="$MATCH"
# absolute - make relative
if [[ $XMATCH =~ '^/' ]]; then
# cut away the last piece of the buffer
local LENGTH=$(( $#LBUFFER - $#XMATCH ))
LBUFFER="${LBUFFER:0:${LENGTH}}"
# and replace it with a relative realpath
LBUFFER+="$(realpath --relative-to=. $XMATCH)"
else # relative - make absolute
local LENGTH=$(( $#LBUFFER - $#XMATCH ))
LBUFFER="${LBUFFER:0:${LENGTH}}"
LBUFFER+="$(realpath $XMATCH)"
fi
fi
else
LBUFFER+=$(pwd)
fi
}
zle -N insert-cwd-or-absolute
bindkey '\ed' insert-cwd-or-absolute

View file

@ -1,88 +0,0 @@
# vim: filetype=sh
# Prompt symbol
COMMON_PROMPT_SYMBOL="Ψ"
# Colors
COMMON_COLORS_HOST_ME=green
COMMON_COLORS_HOST_AWS_VAULT=yellow
COMMON_COLORS_CURRENT_DIR=blue
COMMON_COLORS_RETURN_STATUS_TRUE=99
COMMON_COLORS_RETURN_STATUS_FALSE=red
COMMON_COLORS_GIT_STATUS_DEFAULT=green
COMMON_COLORS_GIT_STATUS_STAGED=red
COMMON_COLORS_GIT_STATUS_UNSTAGED=yellow
COMMON_COLORS_GIT_PROMPT_SHA=green
COMMON_COLORS_BG_JOBS=yellow
# Left Prompt
PROMPT='$(common_host)$(common_current_dir)$(common_bg_jobs)$(common_return_status)'
# Right Prompt
RPROMPT='$(common_git_status)'
# Prompt with current SHA
# PROMPT='$(common_host)$(common_current_dir)$(common_bg_jobs)$(common_return_status)'
# RPROMPT='$(common_git_status) $(git_prompt_short_sha)'
# Host
common_host() {
if [[ -n $SSH_CONNECTION ]]; then
me="%n@%m"
elif [[ $LOGNAME != $USER ]]; then
me="%n"
fi
if [[ -n $me ]]; then
echo "%{$fg[$COMMON_COLORS_HOST_ME]%}$me%{$reset_color%}:"
fi
if [[ $AWS_VAULT ]]; then
echo "%{$fg[$COMMON_COLORS_HOST_AWS_VAULT]%}$AWS_VAULT%{$reset_color%} "
fi
}
# Current directory
common_current_dir() {
echo -n "%{$fg[$COMMON_COLORS_CURRENT_DIR]%}%c "
}
# Prompt symbol
common_return_status() {
echo -n "%(?.%F{$COMMON_COLORS_RETURN_STATUS_TRUE}.%F{$COMMON_COLORS_RETURN_STATUS_FALSE})$COMMON_PROMPT_SYMBOL%f "
}
# Git status
common_git_status() {
local message=""
local message_color="%F{$COMMON_COLORS_GIT_STATUS_DEFAULT}"
# https://git-scm.com/docs/git-status#_short_format
local staged=$(git status --porcelain 2>/dev/null | grep -e "^[MADRCU]")
local unstaged=$(git status --porcelain 2>/dev/null | grep -e "^[MADRCU? ][MADRCU?]")
if [[ -n ${staged} ]]; then
message_color="%F{$COMMON_COLORS_GIT_STATUS_STAGED}"
elif [[ -n ${unstaged} ]]; then
message_color="%F{$COMMON_COLORS_GIT_STATUS_UNSTAGED}"
fi
local branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [[ -n ${branch} ]]; then
message+="${message_color}${branch}%f"
fi
echo -n "${message}"
}
# Git prompt SHA
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="%{%F{$COMMON_COLORS_GIT_PROMPT_SHA}%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%} "
# Background Jobs
common_bg_jobs() {
bg_status="%{$fg[$COMMON_COLORS_BG_JOBS]%}%(1j.↓%j .)"
echo -n $bg_status
}
# xterm title
PROMPT_XTITLE=$'%{\033]0;%n@%M:%~\007%}'
PROMPT="${PROMPT_XTITLE}${PROMPT}"

View file

@ -1,54 +0,0 @@
# Delta
# Reference/Resources:
#
# Prompt Expansion:
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
# http://unix.stackexchange.com/questions/157693/howto-include-output-of-a-script-into-the-zsh-prompt
#
# vcs_info
# https://github.com/zsh-users/zsh/blob/master/Misc/vcs_info-examples
# http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information
delta_prompt_symbol() {
if [[ "$1" -eq 0 ]]; then
print -n '%F{red}'
else
print -n '%F{8}'
fi
}
delta_prompt_init() {
local hostnamevar PRETTY_HOSTNAME CHASSIS LOCATION
if [[ -f /etc/machine-info ]]; then
. /etc/machine-info
if [[ -n $PRETTY_HOSTNAME ]]; then
hostnamevar=$PRETTY_HOSTNAME
fi
fi
if [[ -z $hostnamevar ]]; then
hostnamevar='%m'
fi
if [[ -n $SSH_CONNECTION ]]; then
PROMPT=" \$(delta_prompt_symbol \$?)Δ%f %F{8}$hostnamevar %c >%f "
else
PROMPT=" \$(delta_prompt_symbol \$?)Δ%f %F{8}%c >%f "
fi
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' use-simple true
zstyle ':vcs_info:git*' formats '%b'
zstyle ':vcs_info:git*' actionformats '%b|%a'
zstyle ':vcs_info:*' max-exports 2
}
delta_prompt_init "$@"
# xterm title
PROMPT_XTITLE=$'%{\033]0;%n@%M:%~\007%}'
PROMPT="${PROMPT_XTITLE}${PROMPT}"

View file

@ -1,99 +0,0 @@
# Delta
# Reference/Resources:
#
# Prompt Expansion:
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
# http://unix.stackexchange.com/questions/157693/howto-include-output-of-a-script-into-the-zsh-prompt
#
# vcs_info
# https://github.com/zsh-users/zsh/blob/master/Misc/vcs_info-examples
# http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information
#
__shlvl_deep() {
[[ $SHLVL -gt 1 ]]
}
delta_prompt_symbol() {
if [[ "$1" -eq 0 ]]; then
local color
if __shlvl_deep; then
color=blue
else
color=red
fi
print -n "%F{$color}"
else
print -n '%F{8}'
fi
}
delta_prompt_nix_shell() {
if __shlvl_deep; then
print -n " %F{cyan}>%F{blue}>%F{8}"
tr : '\n' <<<$PATH | grep '^/nix/store' | while read storepath; do
print -n " ${${storepath#*-}%/*}"
done
print -n '%f\n '
else
print -n ' '
fi
}
delta_prompt_init() {
local hostnamevar PRETTY_HOSTNAME CHASSIS LOCATION
if [[ -f /etc/machine-info ]]; then
. /etc/machine-info
if [[ -n $PRETTY_HOSTNAME ]]; then
hostnamevar=$PRETTY_HOSTNAME
fi
fi
if [[ -z $hostnamevar ]]; then
hostnamevar='%m'
fi
if [[ -n $SSH_CONNECTION ]]; then
PROMPT="$(delta_prompt_nix_shell)\$(delta_prompt_symbol \$? red)Δ%f %F{8}$hostnamevar %c >%f "
else
PROMPT="$(delta_prompt_nix_shell)\$(delta_prompt_symbol \$? red)Δ%f %F{8}%c >%f "
fi
unfunction delta_prompt_nix_shell
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' use-simple true
zstyle ':vcs_info:git*' formats '%b'
zstyle ':vcs_info:git*' actionformats '%b|%a'
zstyle ':vcs_info:*' max-exports 2
}
delta_prompt_git_status() {
local message=""
local message_color="%F{green}"
# https://git-scm.com/docs/git-status#_short_format
local staged=$(git status --porcelain 2>/dev/null | grep -e "^[MADRCU]")
local unstaged=$(git status --porcelain 2>/dev/null | grep -e "^[MADRCU? ][MADRCU?]")
if [[ -n ${staged} ]]; then
message_color="%F{red}"
elif [[ -n ${unstaged} ]]; then
message_color="%F{yellow}"
fi
local branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [[ -n ${branch} ]]; then
message+="${message_color}${branch}%f"
fi
echo -n "${message}"
}
delta_prompt_init "$@"
# xterm title
PROMPT_XTITLE=$'%{\033]0;%n@%M:%~\007%}'
PROMPT="${PROMPT_XTITLE}${PROMPT}"
RPROMPT='$(delta_prompt_git_status)'

View file

@ -1,27 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIElzCCAv+gAwIBAgIBATANBgkqhkiG9w0BAQsFADA6MRgwFgYDVQQKDA9QUklW
QVRFVk9JRC5ORVQxHjAcBgNVBAMMFUNlcnRpZmljYXRlIEF1dGhvcml0eTAeFw0x
OTA4MTcxMzQ3NThaFw0zOTA4MTcxMzQ3NThaMDoxGDAWBgNVBAoMD1BSSVZBVEVW
T0lELk5FVDEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MIIBojANBgkq
hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA24YctyMKaCy4gYaWw5O28GW45OML8PAC
DZjeV6fksrI2VlaYYQgQgRrSpFc/f5PL/vl+tlqUmMkVgwkHfA1E0HDS5yl4/13J
nbkbvhLpaXB7ex0kox17dY7c/ZQuN4/DQHh6R5TT9pCKJBPc7za4GnDuv/s6ww/3
Vn4ath3m8WfaPpIXd1/HG3z9Dz3hmH0fww9vsiDXhGxHzZjxjiNaeM9EMh2297E3
yA8wZ4gwCB3wuMKUS/tSJgLOGcRaZgAc+cUIUK6lHqLN8JP7ACpkf1czfEGSTksu
RFNNW2XihXdcE+zh5925buLGpNOQzNwmzdQLrzGPm/IHRluqA361IfqUmR3Oxxr6
vxVG2E9spbRodSKR5884Cg18frAnWk+2HPvW9bsxJpd/GX4sLgjwKDZ43eZ0HoBW
kzfmowJidMB710O5MQOr7Urzl3Qef735Vbc8siKk0gwZasQap59APk5meDtIX7yP
BkwiSUpCR6ynsUck7FliJ2wt022REFcDAgMBAAGjgacwgaQwHwYDVR0jBBgwFoAU
8LCS6AW2IgDn+b4+nfst+CiFO88wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
BAMCAcYwHQYDVR0OBBYEFPCwkugFtiIA5/m+Pp37LfgohTvPMEEGCCsGAQUFBwEB
BDUwMzAxBggrBgEFBQcwAYYlaHR0cDovL2lwYS1jYS5wcml2YXRldm9pZC5uZXQv
Y2Evb2NzcDANBgkqhkiG9w0BAQsFAAOCAYEAFpue77wmQIF7WMVdrmAmB2fBJSTH
qoRTcP5enPIVoS5fi/bhMeIW4iADKRtCo9YezLqAPWoQ+UzDOObmAa3yx/pfJqhV
wMt7E2FvQXkef9v9wcsXSSNE4SWD4UefDBFiTtGcNR4SVAqWAJF4Yym6kjE0OLs7
it4kpvQBC9uxTcBHHIWMhJ85hZbMbTQ1GG1iluhxJFOpl2Zm7GBax2E3a+Fs/msx
yUIGe7ugVKiWX2Cx4e/kEmWogGESeNVEXYnDPxztr+mu5rbzRNU32FzWRlxG1qg3
e77KjTrHC63w230t/Pw7wuYQJzX25bkqIaQat9Xfw/ODtZqrStVwJAooD8z5zpYG
ul9ndmXfM6okRy7eJoSF1nijHNo9p4k+IsAu8j2UShjfTglBTjWA6ZHWuji4AArw
qCdKu2v/DqnGhNAt6zRTmOMW7tct/VBwJtpDdB4IzG+EvH6JdIxQpDew5LuPwbk5
c7VzeA8sxGbslFyLO3Oa1Yy87uQSes+uBHhq
-----END CERTIFICATE-----

View file

@ -5,5 +5,4 @@ let
in { in {
networking.domain = lib.mkDefault "${host.enterprise.subdomain or "services"}.${orgDomain}"; networking.domain = lib.mkDefault "${host.enterprise.subdomain or "services"}.${orgDomain}";
networking.search = [ config.networking.domain "search.${orgDomain}" ]; networking.search = [ config.networking.domain "search.${orgDomain}" ];
security.pki.certificates = [ (builtins.readFile ../../data/ca.crt) ];
} }

View file

@ -1,8 +0,0 @@
let
flake = builtins.getFlake (toString ./.);
nixpkgs = import <nixpkgs> { };
in {
inherit flake;
inherit nixpkgs;
nixos = flake.nixosConfigurations;
}