chore(config): cleanup and removal of duplicates

This commit is contained in:
2024-09-19 09:49:35 +03:00
parent 94e58b307b
commit 81e9b20eb6
10 changed files with 186 additions and 137 deletions

View File

@@ -6,7 +6,7 @@
export DOTFILES="$HOME/.dotfiles"
LOCAL_SHARE="$HOME/.local/share"
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim-kickstart/mason/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
export SHARED_SCRIPTS_SOURCED=0
source "$DOTFILES/config/shared.sh"
@@ -48,15 +48,9 @@ load_antigen()
export ZSHZ_DATA="$XDG_STATE_HOME/z"
antigen bundle z
x-have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
# these should be always available
antigen bundle jreese/zsh-titles
antigen bundle gnu-utils
antigen bundle ssh-agent
antigen bundle gpg-agent
antigen bundle brew
# antigen bundle tmux
antigen bundle colored-man-pages
antigen bundle zsh-users/zsh-completions
antigen bundle eza

View File

@@ -1,8 +1,6 @@
// These are golang packages I use,
// so they should be available with all versions
// sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@release-0.18.0
// Git Profile allows you to switch between user profiles in git repos
github.com/dotzero/git-profile@v1.4.0
// An extensible command line tool or library to format yaml files.

View File

@@ -1,2 +1,3 @@
ansible
pipenv
semgrep

View File

@@ -9,6 +9,7 @@
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME="$HOME/.cache"
[ -z "$XDG_STATE_HOME" ] && export XDG_STATE_HOME="$HOME/.local/state"
[ -z "$XDG_BIN_HOME" ] && export XDG_BIN_HOME="$HOME/.local/bin"
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="$HOME/.local/run"
# if DOTFILES is not set, set it to the default location
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
@@ -399,12 +400,6 @@ x-dc "$DOCKER_CONFIG"
# Docker: Disable snyk ad
export DOCKER_SCAN_SUGGEST=false
# ffmpeg
# https://ffmpeg.org/ffmpeg.html
msg "Setting up FFmpeg configuration"
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
x-have ffmpeg && x-dc "$FFMPEG_DATADIR"
# GnuPG
# https://gnupg.org/documentation/manuals/gnupg/Invoking-GPG.html
msg "Setting up GnuPG configuration"
@@ -416,11 +411,6 @@ msg "Setting up Go configuration"
export GOPATH="$XDG_DATA_HOME/go"
export GOBIN="$XDG_BIN_HOME"
# nb, https://xwmx.github.io/nb/
msg "Setting up nb configuration"
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
export NB_DIR="$XDG_STATE_HOME/nb"
# NPM: Add npm packages to path
msg "Setting up NPM configuration"
x-have node && {
@@ -445,29 +435,9 @@ export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
## for MichaelAquilina/zsh-autoswitch-virtualenv
export AUTOSWITCH_VIRTUAL_ENV_DIR="$WORKON_HOME"
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
x-have pyenv && {
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
}
# Ruby
#
# including: bundler, rbenv
msg "Setting up Ruby configuration"
export GEM_HOME="${XDG_DATA_HOME}"/gem
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}"/gem
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
export RBENV_ROOT="$XDG_STATE_HOME/rbenv"
x-dc "$RBENV_ROOT"
x-have gem && export PATH="${GEM_HOME}/bin:$PATH"
# Rust / cargo
msg "Setting up Rust/Cargo configuration"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export PATH="$CARGO_HOME/bin:$PATH"
export RUST_WITHOUT=rust-docs
# screen
@@ -488,10 +458,6 @@ export TF_DATA_DIR="$XDG_STATE_HOME/terraform"
export TF_CLI_CONFIG_FILE="$XDG_CONFIG_HOME/terraform/terraformrc"
export TF_PLUGIN_CACHE_DIR="$XDG_CACHE_HOME/terraform/plugin-cache"
# tldr / tealdeer
msg "Setting up tldr configuration"
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer/"
# tmux
# https://tmux.github.io/
msg "Setting up tmux configuration"

View File

@@ -16,24 +16,11 @@ tap "mongodb/brew"
tap "reviewdog/tap"
tap "shivammathur/extensions"
tap "shivammathur/php"
tap "snyk/tap"
tap "teamookla/speedtest"
tap "xwmx/taps"
# Run your GitHub Actions locally
brew "act"
# Simple, modern, secure file encryption
brew "age"
# Mozilla CA certificate store
brew "ca-certificates"
# Mozilla CA bundle for Python
brew "certifi"
# Cryptographic recipes and primitives for Python
brew "cryptography"
# YAML Parser
brew "libyaml"
# Automate deployment, configuration, and upgrading
brew "ansible"
# Checks ansible playbooks for practices and behaviour
brew "ansible-lint"
# Generic-purpose lossless compression algorithm by Google
brew "brotli"
# Library and utilities for processing GIFs
@@ -52,32 +39,28 @@ brew "jpeg-xl"
brew "aom"
# Apache Portable Runtime library
brew "apr"
# Mozilla CA certificate store
brew "ca-certificates"
# Cryptography and SSL/TLS Toolkit
brew "openssl@3"
# Companion library to apr, the Apache Portable Runtime library
brew "apr-util"
# Password hashing library and CLI utility
brew "argon2"
# Spell checker with better logic than ispell
brew "aspell"
# Automatic configure script builder
brew "autoconf"
# Tool for generating GNU Standards-compliant Makefiles
brew "automake"
# Collection of over 500 reusable autoconf macros
brew "autoconf-archive"
# Bourne-Again SHell, a UNIX command interpreter
brew "bash"
# GNU multiple precision arithmetic library
brew "gmp"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Extendable version manager with support for Ruby, Node.js, Erlang & more
brew "asdf"
# Spell checker with better logic than ispell
brew "aspell"
# Collection of over 500 reusable autoconf macros
brew "autoconf-archive"
# Manage compile and link flags for libraries
brew "pkg-config"
# Automated text file generator
brew "autogen"
# Bourne-Again SHell, a UNIX command interpreter
brew "bash"
# Clone of cat(1) with syntax highlighting and Git integration
brew "bat"
# Bash Automated Testing System
brew "bats-core"
# Software library to render fonts
brew "freetype"
# XML-based font configuration API for X Windows
@@ -86,32 +69,26 @@ brew "fontconfig"
brew "gettext"
# Core application library for C
brew "glib"
# Human-friendly and fast alternative to cut and (sometimes) awk
brew "choose-rust"
# Cross-platform make
brew "cmake"
# Mozilla CA bundle for Python
brew "certifi"
# Cryptographic recipes and primitives for Python
brew "cryptography"
# Get a file from an HTTP, HTTPS or FTP server
brew "curl"
# Lightweight DNS forwarder and DHCP server
brew "dnsmasq"
# Spellchecker wrapping library
brew "enchant"
# Perl lib for reading and writing EXIF metadata
brew "exiftool"
# Banner-like program prints strings as ASCII art
brew "figlet"
# Lock file during command
brew "flock"
# Libraries to talk to Microsoft SQL Server and Sybase databases
brew "freetds"
# Monitor a directory for changes and run a shell command
brew "fswatch"
# Command-line fuzzy finder written in Go
brew "fzf"
# Graphics library to dynamically manipulate images
brew "gd"
# Disk usage analyzer with console interface written in Go
brew "gdu"
# GitHub command-line tool
brew "gh"
# Distributed revision control system
brew "git"
# Enable transparent encryption/decryption of files in a git repo
@@ -166,8 +143,8 @@ brew "irssi"
brew "jq"
# JSON parser for C
brew "json-c"
# Scanning your k8s clusters, diagnosing, and triaging issues in simple English
brew "k8sgpt"
# Network authentication protocol
brew "krb5"
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
brew "legitify"
# Secure hashing function
@@ -176,58 +153,36 @@ brew "libb2"
brew "libpq"
# Multi-platform support library with a focus on asynchronous I/O
brew "libuv"
# YAML Parser
brew "libyaml"
# Package manager for the Lua programming language
brew "luarocks"
# LZMA-based compression program similar to gzip or bzip2
brew "lzip"
# Swiss Army Knife for macOS
brew "m-cli"
# Collection of tools that nobody wrote when UNIX was young
brew "moreutils"
# Mongrel of mail user agents (part elm, pine, mush, mh, etc.)
brew "mutt"
# NCurses Disk Usage
brew "ncdu"
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
brew "nginx"
# Port scanning utility for large networks
brew "nmap"
# ISO-C API and CLI for generating UUIDs
brew "ossp-uuid"
# Coreutils progress viewer
brew "progress"
# Python version management
brew "pyenv"
# Migrate pip packages from one Python version to another
brew "pyenv-pip-migrate"
# Pyenv plugin to manage virtualenv
brew "pyenv-virtualenv"
# Interpreted, interactive, object-oriented programming language
brew "python@3.11"
# Install various Ruby versions and implementations
brew "ruby-build"
# Ruby version manager
brew "rbenv"
# Static analysis and lint tool, for (ba)sh scripts
brew "shellcheck"
# Feature-rich console based todo list manager
brew "task"
# Cryptography and SSL/TLS Toolkit
brew "openssl@1.1"
# General-purpose scripting language
brew "php"
# Manage compile and link flags for libraries
brew "pkg-config"
# Send macOS User Notifications from the command-line
brew "terminal-notifier"
# Tool which checks for the support of TLS/SSL ciphers and flaws
brew "testssl"
# Terraform version manager inspired by rbenv
brew "tfenv"
# Linter for Terraform files
brew "tflint"
# Static analysis security scanner for your terraform code
brew "tfsec"
# Terminal multiplexer
brew "tmux"
# Display directories as trees (with optional color/HTML output)
brew "tree"
# Tool for creating isolated virtual python environments
brew "virtualenv"
# Command-line interface to the WakaTime api
brew "wakatime-cli"
# Executes a program periodically, showing output fullscreen
@@ -238,8 +193,6 @@ brew "wget"
brew "xdg-ninja", args: ["HEAD"]
# Watcher for macOS 10.14+ light/dark mode changes
brew "cormacrelf/tap/dark-notify"
# Cleans up your $HOME from those pesky dotfiles
brew "doron-cohen/tap/antidot"
# lets you quickly switch between multiple git user profiles
brew "gesquive/tap/git-user"
# Automated code review tool integrated with any code analysis tools regardless of programming language.
@@ -259,13 +212,9 @@ brew "shivammathur/extensions/uuid@8.3"
# Yaml PHP extension
brew "shivammathur/extensions/yaml@8.3"
# General-purpose scripting language
brew "shivammathur/php/php"
# General-purpose scripting language
brew "shivammathur/php/php-debug"
# Command-line interface for 1Password
cask "1password-cli"
# GPU-accelerated terminal emulator
cask "alacritty"
# Find & fix known vulnerabilities in open-source dependencies
brew "snyk/tap/snyk"
# Text editor
cask "coda"
# Universal database tool and SQL client
@@ -274,6 +223,15 @@ cask "dbeaver-community"
cask "dbngin"
# App to build and share containerised applications and microservices
cask "docker"
cask "font-jetbrains-mono"
cask "font-jetbrains-mono-nerd-font"
cask "font-lato"
cask "font-open-sans"
cask "font-roboto"
cask "font-source-code-pro"
cask "font-source-code-pro-for-powerline"
cask "font-source-sans-pro"
cask "font-source-serif-pro"
# GIT client
cask "fork"
# HTTP and GraphQL Client
@@ -284,18 +242,12 @@ cask "jetbrains-toolbox"
cask "keybase"
# Kubernetes IDE
cask "lens"
# Keep all tasks from your todo apps on your menu bar
cask "monofocus"
# Reverse proxy, secure introspectable tunnels to localhost
cask "ngrok"
# Simple application that will prevent iTunes or Apple Music from launching
cask "notunes"
# Knowledge base that works on top of a local folder of plain text Markdown files
cask "obsidian"
# Scheduling application focusing on organisation
cask "omnifocus"
# Collaboration platform for API development
cask "postman"
# Display image info and preview unsupported formats in QuickLook
cask "qlimagesize"
# Quick Look generator for Markdown files
@@ -326,6 +278,8 @@ cask "suspicious-package"
cask "syntax-highlight"
# Python IDE for beginners
cask "thonny"
# To-do list
cask "todoist"
# Configuration application for the Ultimate Hacking Keyboard
cask "uhk-agent"
# Open-source code editor
@@ -334,6 +288,8 @@ cask "visual-studio-code"
cask "vlc"
# Spell-checking service for Finnish
cask "voikkospellservice"
# GPU-accelerated cross-platform terminal emulator and multiplexer
cask "wezterm"
# Application for generating TOTP and HOTP codes
cask "yubico-authenticator"
# Multiplayer code editor

53
config/htop/htoprc Normal file
View File

@@ -0,0 +1,53 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.3.0
config_reader_min_version=3
fields=0 48 17 18 38 39 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs2 Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

73
config/ideavim/ideavimrc Normal file
View File

@@ -0,0 +1,73 @@
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Don't use Ex mode, use Q for formatting.
map Q gq
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc
" https://github.com/ville6000/dotfiles/blob/main/vimrc
set nocompatible " disable compatibility mode with vi
filetype off " disable filetype detection (but re-enable later, see below)
set encoding=utf-8 " UTF-8
set number " Show line numbers
set laststatus=2 " Always show statusline (even with only single window)
set showmatch " Highlight matching brace
set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set cindent " Use 'C' style program indenting
set expandtab " Use spaces instead of tabs
set shiftwidth=4 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=4 " Number of spaces per Tab
set ruler " Show row and column ruler information
set cursorline " Highlight current line
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
set so=5
" move vertically by visual line (don't skip wrapped lines)
nmap j gj
nmap k gk
syntax enable
filetype plugin indent on
call plug#begin('~/.vim/plugged')
Plug 'ayu-theme/ayu-vim'
Plug 'ctrlpvim/ctrlp.vim'
call plug#end()
set termguicolors
set background=dark
let ayucolor="dark"
colorscheme ayu
if has('gui_running')
set macligatures
set guifont=JetBrainsMono:h14
endif

8
config/yamlfmt/.yamlfmt Normal file
View File

@@ -0,0 +1,8 @@
formatter:
type: basic
indent: 2
retain_line_breaks: false
disallow_anchors: false
max_line_length: 0
scan_folded_as_literal: false
indentless_arrays: false

View File

@@ -35,10 +35,6 @@
relink: true
path: config/*
exclude: [config/nvm]
~/.config/nvm/default-packages:
create: true
relink: true
path: config/nvm/default-packages
~/.local/bin:
glob: true
path: local/bin/*
@@ -53,7 +49,7 @@
mode: 0600
path: ssh/*
- shell:
- bash add-submodules.sh
- bash add-submodules.sh || true
- git submodule update --init --recursive --force
- bash local/bin/dfm install all
- pipx:

View File

@@ -309,6 +309,10 @@ section_brew()
brew bundle dump \
--force \
--file="$BREWFILE" \
--cleanup \
--tap \
--formula \
--cask \
--describe && msg_yay "Done!"
;;
leaves)