mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-05 21:49:21 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab34c148a6 | |||
|
|
910b29ed9f | ||
| 3fb0a75a62 | |||
|
|
f73abb508b | ||
|
|
1dd3d952cf | ||
| 1ffd6e1569 | |||
| a76033a48a | |||
| 34dc18883e | |||
| 832d8b94f3 | |||
| c40eb765f8 | |||
|
|
1bb7e9076b | ||
|
|
17821dfefa |
@@ -48,7 +48,7 @@ repos:
|
|||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 39.74.1
|
rev: 39.82.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
asdf-plugin-manager 1.4.0
|
asdf-plugin-manager 1.4.0
|
||||||
golang 1.23.3
|
golang 1.23.4
|
||||||
ruby 3.3.4
|
|
||||||
rust 1.82.0
|
rust 1.82.0
|
||||||
direnv 2.35.0
|
direnv 2.35.0
|
||||||
fd 10.2.0
|
fd 10.2.0
|
||||||
1password-cli 2.30.3
|
1password-cli 2.30.3
|
||||||
age 1.2.0
|
age 1.2.1
|
||||||
bottom 0.10.2
|
bottom 0.10.2
|
||||||
dotenv-linter 3.3.0
|
dotenv-linter 3.3.0
|
||||||
editorconfig-checker 2.8.0
|
editorconfig-checker 2.8.0
|
||||||
github-cli 2.61.0
|
github-cli 2.64.0
|
||||||
hadolint 2.12.0
|
hadolint 2.12.0
|
||||||
kubectl 1.31.2
|
kubectl 1.32.0
|
||||||
pre-commit 4.0.1
|
pre-commit 4.0.1
|
||||||
ripgrep 14.1.1
|
ripgrep 14.1.1
|
||||||
shellcheck 0.10.0
|
shellcheck 0.10.0
|
||||||
shfmt 3.10.0
|
shfmt 3.10.0
|
||||||
terragrunt 0.68.8
|
terragrunt 0.68.8
|
||||||
tf-summarize 0.3.13
|
tf-summarize 0.3.14
|
||||||
yamllint 1.35.1
|
yamllint 1.35.1
|
||||||
yq 4.44.3
|
yq 4.44.6
|
||||||
bats 1.11.0
|
|
||||||
gitleaks 8.18.4
|
|
||||||
delta 0.18.1
|
|
||||||
eza 0.20.8
|
|
||||||
sops 3.9.1
|
|
||||||
|
|||||||
@@ -40,13 +40,37 @@ automatically-unhide-macos-hidden-apps = true
|
|||||||
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
|
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
|
||||||
|
|
||||||
[[on-window-detected]]
|
[[on-window-detected]]
|
||||||
if.app-name-regex-substring = 'ferdium'
|
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
|
||||||
run = 'layout floating'
|
run = ['layout floating']
|
||||||
|
|
||||||
[[on-window-detected]]
|
[[on-window-detected]]
|
||||||
if.app-name-regex-substring = 'finder'
|
if.app-name-regex-substring = 'finder'
|
||||||
run = 'layout floating'
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.finder' # Finder
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.mail' # Mail
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.DanPristupov.Fork' # Fork
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.flexibits.fantastical2.mac' # Fantastical
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'org.whispersystems.signal-desktop' # Signal
|
||||||
|
run = 'layout floating'
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.tidal.desktop'
|
||||||
|
run = ['layout floating', 'move-node-to-workspace 2']
|
||||||
|
|
||||||
# Possible values: (qwerty|dvorak)
|
# Possible values: (qwerty|dvorak)
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||||
[key-mapping]
|
[key-mapping]
|
||||||
@@ -62,10 +86,11 @@ preset = 'qwerty'
|
|||||||
[gaps]
|
[gaps]
|
||||||
inner.horizontal = 5
|
inner.horizontal = 5
|
||||||
inner.vertical = 5
|
inner.vertical = 5
|
||||||
outer.top = 5
|
# outer.top = 0
|
||||||
outer.right = 5
|
outer.top = [{ monitor.'^built-in retina display$' = 20 }, 0]
|
||||||
outer.bottom = 5
|
outer.right = 0
|
||||||
outer.left = 5
|
outer.bottom = 0
|
||||||
|
outer.left = 0
|
||||||
|
|
||||||
# 'main' binding mode declaration
|
# 'main' binding mode declaration
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
@@ -97,13 +122,13 @@ outer.left = 5
|
|||||||
# end tell'
|
# end tell'
|
||||||
# '''
|
# '''
|
||||||
|
|
||||||
alt-ctrl-shift-f = 'fullscreen'
|
alt-cmd-shift-f = 'fullscreen'
|
||||||
alt-ctrl-f = 'layout floating'
|
alt-cmd-f = 'layout floating'
|
||||||
|
|
||||||
alt-shift-left = 'join-with left'
|
alt-cmd-left = 'join-with left'
|
||||||
alt-shift-down = 'join-with down'
|
alt-cmd-down = 'join-with down'
|
||||||
alt-shift-up = 'join-with up'
|
alt-cmd-up = 'join-with up'
|
||||||
alt-shift-right = 'join-with right'
|
alt-cmd-right = 'join-with right'
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
||||||
alt-h = 'focus left'
|
alt-h = 'focus left'
|
||||||
@@ -117,39 +142,32 @@ alt-shift-j = 'move down'
|
|||||||
alt-shift-k = 'move up'
|
alt-shift-k = 'move up'
|
||||||
alt-shift-l = 'move right'
|
alt-shift-l = 'move right'
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
|
||||||
alt-shift-minus = 'resize smart -50'
|
|
||||||
alt-shift-equal = 'resize smart +50'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||||
alt-cmd-z = 'workspace 1'
|
cmd-shift-1 = 'workspace 1' # Main
|
||||||
alt-cmd-x = 'workspace 2'
|
cmd-shift-2 = 'workspace 2' # Music
|
||||||
# alt-cmd-c = 'workspace 3'
|
|
||||||
# alt-cmd-v = 'workspace 4'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||||
alt-shift-1 = 'move-node-to-workspace 1 --focus-follows-window'
|
alt-cmd-1 = 'move-node-to-workspace 1 --focus-follows-window'
|
||||||
alt-shift-2 = 'move-node-to-workspace 2 --focus-follows-window'
|
alt-cmd-2 = 'move-node-to-workspace 2 --focus-follows-window'
|
||||||
# alt-shift-3 = 'move-node-to-workspace 3 --focus-follows-window'
|
|
||||||
# alt-shift-4 = 'move-node-to-workspace 4 --focus-follows-window'
|
|
||||||
|
|
||||||
alt-tab = 'workspace-back-and-forth'
|
shift-tab = 'workspace-back-and-forth'
|
||||||
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||||
alt-cmd-s = 'mode service'
|
|
||||||
alt-cmd-a = 'mode apps'
|
|
||||||
|
|
||||||
# Taken:
|
|
||||||
# - <alt> + hjkl 1234 ,.
|
|
||||||
# - <alt><shift> + hjkl 1234 -=; <cr> ↑↓←→
|
|
||||||
alt-c = 'exec-and-forget open -a /Applications/Ferdium.app'
|
|
||||||
alt-o = 'exec-and-forget open -a /Applications/Obsidian.app'
|
|
||||||
alt-b = 'exec-and-forget open -a /Applications/Brave Browser.app'
|
|
||||||
alt-t = 'exec-and-forget open -a /Applications/TIDAL.app'
|
|
||||||
|
|
||||||
# 'service' binding mode declaration.
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
|
alt-a = 'mode apps'
|
||||||
|
alt-s = 'mode service'
|
||||||
|
alt-d = 'mode resize'
|
||||||
|
|
||||||
|
[mode.apps.binding]
|
||||||
|
esc = ['reload-config', 'mode main']
|
||||||
|
alt-b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main']
|
||||||
|
alt-c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main']
|
||||||
|
alt-o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main']
|
||||||
|
alt-s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main']
|
||||||
|
alt-t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main']
|
||||||
|
alt-w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main']
|
||||||
|
|
||||||
[mode.service.binding]
|
[mode.service.binding]
|
||||||
esc = ['reload-config', 'mode main']
|
esc = ['reload-config', 'mode main']
|
||||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||||
@@ -157,5 +175,9 @@ r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
|||||||
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
||||||
backspace = ['close-all-windows-but-current', 'mode main']
|
backspace = ['close-all-windows-but-current', 'mode main']
|
||||||
|
|
||||||
[mode.apps.binding]
|
[mode.resize.binding]
|
||||||
alt-w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main']
|
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
||||||
|
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||||
|
h = 'resize smart -70'
|
||||||
|
l = 'resize smart +70'
|
||||||
|
esc = ['reload-config', 'mode main']
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
|
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
|
||||||
age https://github.com/threkk/asdf-age.git 396bdf6
|
age https://github.com/threkk/asdf-age.git 396bdf6
|
||||||
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git b5862c1
|
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git b5862c1
|
||||||
bats https://github.com/timgluz/asdf-bats.git 299551f
|
|
||||||
bottom https://github.com/carbonteq/asdf-btm.git fd8a55a
|
|
||||||
delta https://github.com/andweeb/asdf-delta.git 501318b
|
|
||||||
direnv https://github.com/asdf-community/asdf-direnv.git 6ff3dbe
|
direnv https://github.com/asdf-community/asdf-direnv.git 6ff3dbe
|
||||||
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
|
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
|
||||||
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
|
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
|
||||||
eza https://github.com/lwiechec/asdf-eza.git 11f578d
|
|
||||||
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
|
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
|
||||||
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
|
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
|
||||||
gitleaks https://github.com/jmcvetta/asdf-gitleaks.git 0cc0d7e
|
|
||||||
golang https://github.com/asdf-community/asdf-golang.git e2527a3
|
golang https://github.com/asdf-community/asdf-golang.git e2527a3
|
||||||
hadolint https://github.com/devlincashman/asdf-hadolint.git 335e230
|
hadolint https://github.com/devlincashman/asdf-hadolint.git c8eb88b
|
||||||
kubectl https://github.com/asdf-community/asdf-kubectl.git 2fb3b57
|
kubectl https://github.com/asdf-community/asdf-kubectl.git 2fb3b57
|
||||||
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
|
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
|
||||||
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
|
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
|
||||||
ruby https://github.com/asdf-vm/asdf-ruby.git 194fe45
|
|
||||||
rust https://github.com/code-lever/asdf-rust.git 95acf4f
|
rust https://github.com/code-lever/asdf-rust.git 95acf4f
|
||||||
shellcheck https://github.com/luizm/asdf-shellcheck.git 66200ff
|
shellcheck https://github.com/luizm/asdf-shellcheck.git 66200ff
|
||||||
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
|
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
|
||||||
sops https://github.com/feniix/asdf-sops.git 5c7a2fb
|
terragrunt https://github.com/ohmer/asdf-terragrunt.git 29f2935
|
||||||
terragrunt https://github.com/ohmer/asdf-terragrunt.git 4a6651a
|
|
||||||
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
|
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
|
||||||
yamllint https://github.com/ericcornelissen/asdf-yamllint.git bc2813e
|
yamllint https://github.com/ericcornelissen/asdf-yamllint.git e4cfb17
|
||||||
yq https://github.com/sudermanjr/asdf-yq.git 772992f
|
yq https://github.com/sudermanjr/asdf-yq.git 772992f
|
||||||
|
|||||||
@@ -11,3 +11,5 @@
|
|||||||
[include]
|
[include]
|
||||||
path = ~/.config/git/overrides/config
|
path = ~/.config/git/overrides/config
|
||||||
|
|
||||||
|
[advice]
|
||||||
|
detachedHead = false
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ tap "jesseduffield/lazygit"
|
|||||||
tap "k8sgpt-ai/k8sgpt"
|
tap "k8sgpt-ai/k8sgpt"
|
||||||
tap "keith/formulae"
|
tap "keith/formulae"
|
||||||
tap "mongodb/brew"
|
tap "mongodb/brew"
|
||||||
|
tap "nikitabobko/tap"
|
||||||
tap "reviewdog/tap"
|
tap "reviewdog/tap"
|
||||||
tap "shivammathur/extensions"
|
tap "shivammathur/extensions"
|
||||||
tap "shivammathur/php"
|
tap "shivammathur/php"
|
||||||
@@ -21,6 +22,20 @@ tap "teamookla/speedtest"
|
|||||||
tap "xwmx/taps"
|
tap "xwmx/taps"
|
||||||
# Run your GitHub Actions locally
|
# Run your GitHub Actions locally
|
||||||
brew "act"
|
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
|
# Generic-purpose lossless compression algorithm by Google
|
||||||
brew "brotli"
|
brew "brotli"
|
||||||
# Library and utilities for processing GIFs
|
# Library and utilities for processing GIFs
|
||||||
@@ -31,6 +46,8 @@ brew "highway"
|
|||||||
brew "imath"
|
brew "imath"
|
||||||
# JPEG image codec that aids compression and decompression
|
# JPEG image codec that aids compression and decompression
|
||||||
brew "jpeg-turbo"
|
brew "jpeg-turbo"
|
||||||
|
# Library for manipulating PNG images
|
||||||
|
brew "libpng"
|
||||||
# Zstandard is a real-time compression algorithm
|
# Zstandard is a real-time compression algorithm
|
||||||
brew "zstd"
|
brew "zstd"
|
||||||
# New file format for still image compression
|
# New file format for still image compression
|
||||||
@@ -39,32 +56,38 @@ brew "jpeg-xl"
|
|||||||
brew "aom"
|
brew "aom"
|
||||||
# Apache Portable Runtime library
|
# Apache Portable Runtime library
|
||||||
brew "apr"
|
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
|
# Companion library to apr, the Apache Portable Runtime library
|
||||||
brew "apr-util"
|
brew "apr-util"
|
||||||
# Password hashing library and CLI utility
|
# Password hashing library and CLI utility
|
||||||
brew "argon2"
|
brew "argon2"
|
||||||
# Spell checker with better logic than ispell
|
|
||||||
brew "aspell"
|
|
||||||
# Automatic configure script builder
|
# Automatic configure script builder
|
||||||
brew "autoconf"
|
brew "autoconf"
|
||||||
# Collection of over 500 reusable autoconf macros
|
# Tool for generating GNU Standards-compliant Makefiles
|
||||||
brew "autoconf-archive"
|
brew "automake"
|
||||||
# Cryptographic recipes and primitives for Python
|
|
||||||
brew "cryptography"
|
|
||||||
# Official Amazon AWS command-line interface
|
|
||||||
brew "awscli"
|
|
||||||
# Bourne-Again SHell, a UNIX command interpreter
|
|
||||||
brew "bash"
|
|
||||||
# GNU multiple precision arithmetic library
|
# GNU multiple precision arithmetic library
|
||||||
brew "gmp"
|
brew "gmp"
|
||||||
# GNU File, Shell, and Text utilities
|
# GNU File, Shell, and Text utilities
|
||||||
brew "coreutils"
|
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"
|
||||||
|
# Package compiler and linker metadata toolkit
|
||||||
|
brew "pkgconf"
|
||||||
|
# Automated text file generator
|
||||||
|
brew "autogen"
|
||||||
|
# Official Amazon AWS command-line interface
|
||||||
|
brew "awscli"
|
||||||
|
# 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
|
# Bash Automated Testing System
|
||||||
brew "bats-core"
|
brew "bats-core"
|
||||||
|
# Parser generator
|
||||||
|
brew "bison"
|
||||||
# Software library to render fonts
|
# Software library to render fonts
|
||||||
brew "freetype"
|
brew "freetype"
|
||||||
# XML-based font configuration API for X Windows
|
# XML-based font configuration API for X Windows
|
||||||
@@ -73,18 +96,32 @@ brew "fontconfig"
|
|||||||
brew "gettext"
|
brew "gettext"
|
||||||
# Core application library for C
|
# Core application library for C
|
||||||
brew "glib"
|
brew "glib"
|
||||||
# Mozilla CA bundle for Python
|
# Human-friendly and fast alternative to cut and (sometimes) awk
|
||||||
brew "certifi"
|
brew "choose-rust"
|
||||||
|
# Cross-platform make
|
||||||
|
brew "cmake"
|
||||||
# Get a file from an HTTP, HTTPS or FTP server
|
# Get a file from an HTTP, HTTPS or FTP server
|
||||||
brew "curl"
|
brew "curl"
|
||||||
# Lightweight DNS forwarder and DHCP server
|
# Lightweight DNS forwarder and DHCP server
|
||||||
brew "dnsmasq"
|
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
|
# Lock file during command
|
||||||
brew "flock"
|
brew "flock"
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
brew "freetds"
|
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
|
# Graphics library to dynamically manipulate images
|
||||||
brew "gd"
|
brew "gd"
|
||||||
|
# Disk usage analyzer with console interface written in Go
|
||||||
|
brew "gdu"
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
brew "gh"
|
brew "gh"
|
||||||
# OpenType text shaping engine
|
# OpenType text shaping engine
|
||||||
@@ -95,22 +132,40 @@ brew "libb2"
|
|||||||
brew "pango"
|
brew "pango"
|
||||||
# Distributed revision control system
|
# Distributed revision control system
|
||||||
brew "git"
|
brew "git"
|
||||||
|
# Enable transparent encryption/decryption of files in a git repo
|
||||||
|
brew "git-crypt"
|
||||||
|
# Small git utilities
|
||||||
|
brew "git-extras"
|
||||||
|
# See your latest local git branches, formatted real fancy
|
||||||
|
brew "git-recent"
|
||||||
# Render markdown on the CLI
|
# Render markdown on the CLI
|
||||||
brew "glow"
|
brew "glow"
|
||||||
|
# GNU implementation of the famous stream editor
|
||||||
|
brew "gnu-sed"
|
||||||
# Validating, recursive, caching DNS resolver
|
# Validating, recursive, caching DNS resolver
|
||||||
brew "unbound"
|
brew "unbound"
|
||||||
# GNU Transport Layer Security (TLS) Library
|
# GNU Transport Layer Security (TLS) Library
|
||||||
brew "gnutls"
|
brew "gnutls"
|
||||||
# GNU Pretty Good Privacy (PGP) package
|
# GNU Pretty Good Privacy (PGP) package
|
||||||
brew "gnupg"
|
brew "gnupg"
|
||||||
|
# Library access to GnuPG
|
||||||
|
brew "gpgme"
|
||||||
|
# Open source suite of directory software
|
||||||
|
brew "openldap"
|
||||||
|
# Manage your GnuPG keys with ease!
|
||||||
|
brew "gpg-tui"
|
||||||
# Image manipulation
|
# Image manipulation
|
||||||
brew "netpbm"
|
brew "netpbm"
|
||||||
# Library to render SVG files using Cairo
|
# Library to render SVG files using Cairo
|
||||||
brew "librsvg"
|
brew "librsvg"
|
||||||
# Graph visualization software from AT&T and Bell Labs
|
# Graph visualization software from AT&T and Bell Labs
|
||||||
brew "graphviz"
|
brew "graphviz"
|
||||||
|
# GNU grep, egrep and fgrep
|
||||||
|
brew "grep"
|
||||||
# Popular GNU data compression program
|
# Popular GNU data compression program
|
||||||
brew "gzip"
|
brew "gzip"
|
||||||
|
# Text-based UI library
|
||||||
|
brew "ncurses"
|
||||||
# Improved top (interactive process viewer)
|
# Improved top (interactive process viewer)
|
||||||
brew "htop"
|
brew "htop"
|
||||||
# Portable abstraction of the hierarchical topology of modern architectures
|
# Portable abstraction of the hierarchical topology of modern architectures
|
||||||
@@ -121,6 +176,8 @@ brew "libheif"
|
|||||||
brew "imagemagick"
|
brew "imagemagick"
|
||||||
# Modular IRC client
|
# Modular IRC client
|
||||||
brew "irssi"
|
brew "irssi"
|
||||||
|
# Image manipulation library
|
||||||
|
brew "jpeg"
|
||||||
# Lightweight and flexible command-line JSON processor
|
# Lightweight and flexible command-line JSON processor
|
||||||
brew "jq"
|
brew "jq"
|
||||||
# JSON parser for C
|
# JSON parser for C
|
||||||
@@ -129,40 +186,76 @@ brew "json-c"
|
|||||||
brew "krb5"
|
brew "krb5"
|
||||||
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
||||||
brew "legitify"
|
brew "legitify"
|
||||||
|
# BSD-style licensed readline alternative
|
||||||
|
brew "libedit"
|
||||||
|
# Conversion library
|
||||||
|
brew "libiconv"
|
||||||
# Postgres C API library
|
# Postgres C API library
|
||||||
brew "libpq"
|
brew "libpq"
|
||||||
|
# Version of the SSL/TLS protocol forked from OpenSSL
|
||||||
|
brew "libressl"
|
||||||
# Multi-platform support library with a focus on asynchronous I/O
|
# Multi-platform support library with a focus on asynchronous I/O
|
||||||
brew "libuv"
|
brew "libuv"
|
||||||
# YAML Parser
|
# GNOME XML library
|
||||||
brew "libyaml"
|
brew "libxml2"
|
||||||
|
# C library for reading, creating, and modifying zip archives
|
||||||
|
brew "libzip"
|
||||||
# Package manager for the Lua programming language
|
# Package manager for the Lua programming language
|
||||||
brew "luarocks"
|
brew "luarocks"
|
||||||
|
# LZMA-based compression program similar to gzip or bzip2
|
||||||
|
brew "lzip"
|
||||||
# Swiss Army Knife for macOS
|
# Swiss Army Knife for macOS
|
||||||
brew "m-cli"
|
brew "m-cli"
|
||||||
|
# Collection of tools that nobody wrote when UNIX was young
|
||||||
|
brew "moreutils"
|
||||||
|
# NCurses Disk Usage
|
||||||
|
brew "ncdu"
|
||||||
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
|
# HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
|
||||||
brew "nginx"
|
brew "nginx"
|
||||||
# Port scanning utility for large networks
|
# Port scanning utility for large networks
|
||||||
brew "nmap"
|
brew "nmap"
|
||||||
# Libraries for security-enabled client and server applications
|
# Libraries for security-enabled client and server applications
|
||||||
brew "nss"
|
brew "nss"
|
||||||
# Open source suite of directory software
|
# Cryptography and SSL/TLS Toolkit
|
||||||
brew "openldap"
|
brew "openssl@1.1"
|
||||||
# General-purpose scripting language
|
# ISO-C API and CLI for generating UUIDs
|
||||||
brew "php"
|
brew "ossp-uuid"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
brew "php@8.2"
|
brew "php@8.2"
|
||||||
# Manage compile and link flags for libraries
|
# General-purpose scripting language
|
||||||
brew "pkg-config"
|
brew "php@8.3", link: true
|
||||||
|
# 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"
|
||||||
|
# Generate C-based recognizers from regular expressions
|
||||||
|
brew "re2c"
|
||||||
|
# Static analysis and lint tool, for (ba)sh scripts
|
||||||
|
brew "shellcheck"
|
||||||
# Send macOS User Notifications from the command-line
|
# Send macOS User Notifications from the command-line
|
||||||
brew "terminal-notifier"
|
brew "terminal-notifier"
|
||||||
# Tool which checks for the support of TLS/SSL ciphers and flaws
|
# Tool which checks for the support of TLS/SSL ciphers and flaws
|
||||||
brew "testssl"
|
brew "testssl"
|
||||||
|
# Terraform version manager inspired by rbenv
|
||||||
|
brew "tfenv"
|
||||||
|
# Linter for Terraform files
|
||||||
|
brew "tflint"
|
||||||
# Static analysis security scanner for your terraform code
|
# Static analysis security scanner for your terraform code
|
||||||
brew "tfsec"
|
brew "tfsec"
|
||||||
# Terminal multiplexer
|
# Terminal multiplexer
|
||||||
brew "tmux"
|
brew "tmux"
|
||||||
# Display directories as trees (with optional color/HTML output)
|
# Display directories as trees (with optional color/HTML output)
|
||||||
brew "tree"
|
brew "tree"
|
||||||
|
# Tool for creating isolated virtual python environments
|
||||||
|
brew "virtualenv"
|
||||||
# Command-line interface to the WakaTime api
|
# Command-line interface to the WakaTime api
|
||||||
brew "wakatime-cli"
|
brew "wakatime-cli"
|
||||||
# Executes a program periodically, showing output fullscreen
|
# Executes a program periodically, showing output fullscreen
|
||||||
@@ -171,10 +264,16 @@ brew "watch"
|
|||||||
brew "wget"
|
brew "wget"
|
||||||
# Check your $HOME for unwanted files and directories
|
# Check your $HOME for unwanted files and directories
|
||||||
brew "xdg-ninja", args: ["HEAD"]
|
brew "xdg-ninja", args: ["HEAD"]
|
||||||
|
# General-purpose lossless data-compression library
|
||||||
|
brew "zlib"
|
||||||
# Watcher for macOS 10.14+ light/dark mode changes
|
# Watcher for macOS 10.14+ light/dark mode changes
|
||||||
brew "cormacrelf/tap/dark-notify"
|
brew "cormacrelf/tap/dark-notify"
|
||||||
# Igbinary PHP extension
|
# Cleans up your $HOME from those pesky dotfiles
|
||||||
brew "shivammathur/extensions/igbinary@8.3"
|
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.
|
||||||
|
brew "reviewdog/tap/reviewdog"
|
||||||
# Imagick PHP extension
|
# Imagick PHP extension
|
||||||
brew "shivammathur/extensions/imagick@8.3"
|
brew "shivammathur/extensions/imagick@8.3"
|
||||||
# Mcrypt PHP extension
|
# Mcrypt PHP extension
|
||||||
@@ -190,9 +289,15 @@ brew "shivammathur/extensions/uuid@8.3"
|
|||||||
# Yaml PHP extension
|
# Yaml PHP extension
|
||||||
brew "shivammathur/extensions/yaml@8.3"
|
brew "shivammathur/extensions/yaml@8.3"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
|
brew "shivammathur/php/php", link: false
|
||||||
|
# General-purpose scripting language
|
||||||
brew "shivammathur/php/php-debug"
|
brew "shivammathur/php/php-debug"
|
||||||
# Find & fix known vulnerabilities in open-source dependencies
|
# Find & fix known vulnerabilities in open-source dependencies
|
||||||
brew "snyk/tap/snyk"
|
brew "snyk/tap/snyk"
|
||||||
|
# Command-line interface for 1Password
|
||||||
|
cask "1password-cli"
|
||||||
|
# AeroSpace is an i3-like tiling window manager for macOS
|
||||||
|
cask "aerospace"
|
||||||
# Text editor
|
# Text editor
|
||||||
cask "coda"
|
cask "coda"
|
||||||
# Universal database tool and SQL client
|
# Universal database tool and SQL client
|
||||||
@@ -206,10 +311,7 @@ cask "font-jetbrains-mono-nerd-font"
|
|||||||
cask "font-lato"
|
cask "font-lato"
|
||||||
cask "font-open-sans"
|
cask "font-open-sans"
|
||||||
cask "font-roboto"
|
cask "font-roboto"
|
||||||
cask "font-source-code-pro"
|
|
||||||
cask "font-source-code-pro-for-powerline"
|
cask "font-source-code-pro-for-powerline"
|
||||||
cask "font-source-sans-pro"
|
|
||||||
cask "font-source-serif-pro"
|
|
||||||
# GIT client
|
# GIT client
|
||||||
cask "fork"
|
cask "fork"
|
||||||
# HTTP and GraphQL Client
|
# HTTP and GraphQL Client
|
||||||
|
|||||||
@@ -91,21 +91,19 @@ return {
|
|||||||
-- default list of enabled providers defined so that you can extend it
|
-- default list of enabled providers defined so that you can extend it
|
||||||
-- elsewhere in your config, without redefining it, via `opts_extend`
|
-- elsewhere in your config, without redefining it, via `opts_extend`
|
||||||
sources = {
|
sources = {
|
||||||
|
default = {
|
||||||
|
'lsp',
|
||||||
|
'copilot',
|
||||||
|
'path',
|
||||||
|
'snippets',
|
||||||
|
'buffer',
|
||||||
|
},
|
||||||
providers = {
|
providers = {
|
||||||
copilot = {
|
copilot = {
|
||||||
name = 'copilot',
|
name = 'copilot',
|
||||||
module = 'blink-cmp-copilot',
|
module = 'blink-cmp-copilot',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
completion = {
|
|
||||||
enabled_providers = {
|
|
||||||
'lsp',
|
|
||||||
'copilot',
|
|
||||||
'path',
|
|
||||||
'snippets',
|
|
||||||
'buffer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- experimental auto-brackets support
|
-- experimental auto-brackets support
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
-- Library of 40+ independent Lua modules improving overall Neovim
|
-- Library of 40+ independent Lua modules improving overall Neovim
|
||||||
-- (version 0.8 and higher) experience with minimal effort
|
-- (version 0.8 and higher) experience with minimal effort
|
||||||
|
--
|
||||||
-- https://github.com/echasnovski/mini.nvim
|
-- https://github.com/echasnovski/mini.nvim
|
||||||
-- https://github.com/echasnovski/mini.nvim/tree/main?tab=readme-ov-file#modules
|
-- https://github.com/echasnovski/mini.nvim/tree/main?tab=readme-ov-file#modules
|
||||||
|
--
|
||||||
|
-- YouTube: Text editing with 'mini.nvim' - Neovimconf 2024 - Evgeni Chasnovski
|
||||||
|
-- https://www.youtube.com/watch?v=cNK5kYJ7mrs
|
||||||
{
|
{
|
||||||
'echasnovski/mini.nvim',
|
'echasnovski/mini.nvim',
|
||||||
version = '*',
|
version = '*',
|
||||||
|
|||||||
184
local/bin/a
Executable file
184
local/bin/a
Executable file
@@ -0,0 +1,184 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# A script for encrypting and decrypting files or directories with age and SSH keys
|
||||||
|
|
||||||
|
VERSION="1.0.0"
|
||||||
|
|
||||||
|
# Default ENV values
|
||||||
|
KEYS_FILE="${AGE_KEYSFILE:-$HOME/.ssh/keys.txt}"
|
||||||
|
KEYS_SOURCE="${AGE_KEYSSOURCE:-https://github.com/ivuorinen.keys}"
|
||||||
|
LOG_FILE="${AGE_LOGFILE:-$HOME/.cache/a.log}"
|
||||||
|
|
||||||
|
VERBOSE=false
|
||||||
|
|
||||||
|
# Parse flags for verbosity
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ "$arg" == "-v" || "$arg" == "--verbose" ]]; then
|
||||||
|
VERBOSE=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Ensure log directory and file exist with correct permissions
|
||||||
|
prepare_log_file() {
|
||||||
|
local log_dir
|
||||||
|
log_dir=$(dirname "$LOG_FILE")
|
||||||
|
|
||||||
|
# Create log directory if it does not exist
|
||||||
|
if [[ ! -d "$log_dir" ]]; then
|
||||||
|
mkdir -p "$log_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create log file if it does not exist
|
||||||
|
if [[ ! -f "$LOG_FILE" ]]; then
|
||||||
|
touch "$LOG_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set permissions to 0600
|
||||||
|
chmod 0600 "$LOG_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_log_file
|
||||||
|
|
||||||
|
# Logging function
|
||||||
|
log_message() {
|
||||||
|
local message="$1"
|
||||||
|
echo "$(date +'%Y-%m-%d %H:%M:%S') - $message" >> "$LOG_FILE"
|
||||||
|
|
||||||
|
# Print to user if verbose flag is set
|
||||||
|
if [[ "$VERBOSE" == true ]]; then
|
||||||
|
echo "$message"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to print usage
|
||||||
|
print_help() {
|
||||||
|
cat <<EOF
|
||||||
|
Usage: a [command] [file_or_directory] [options]
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
e, enc, encrypt Encrypt the specified file or directory
|
||||||
|
d, dec, decrypt Decrypt the specified file or directory
|
||||||
|
help, --help Show this help message
|
||||||
|
version, --version Show version information
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-v, --verbose Print log messages to console in addition to writing to log file
|
||||||
|
|
||||||
|
Environment Variables:
|
||||||
|
AGE_KEYSFILE Path to the SSH keys file (default: $HOME/.ssh/keys.txt)
|
||||||
|
AGE_KEYSSOURCE URL to fetch SSH keys if keys file does not exist
|
||||||
|
AGE_LOGFILE Path to the log file (default: $HOME/.cache/a.log)
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Encrypt a file:
|
||||||
|
a e file.txt
|
||||||
|
|
||||||
|
Encrypt a directory:
|
||||||
|
a e /path/to/directory
|
||||||
|
|
||||||
|
Decrypt a file:
|
||||||
|
a d file.txt.age
|
||||||
|
|
||||||
|
Specify a custom keys file:
|
||||||
|
AGE_KEYSFILE=/path/to/keys.txt a e file.txt
|
||||||
|
|
||||||
|
Specify a custom keys source and log file:
|
||||||
|
AGE_KEYSSOURCE=https://example.com/keys.txt AGE_LOGFILE=/tmp/a.log a d file.txt.age
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to print version
|
||||||
|
print_version() {
|
||||||
|
echo "a version $VERSION"
|
||||||
|
echo "Created by Ismo Vuorinen <https://github.com/ivuorinen>"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to fetch keys if missing
|
||||||
|
fetch_keys_if_missing() {
|
||||||
|
if [[ ! -f "$KEYS_FILE" ]]; then
|
||||||
|
log_message "Keys file '$KEYS_FILE' not found. Attempting to fetch from $KEYS_SOURCE..."
|
||||||
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
|
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
||||||
|
|
||||||
|
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
||||||
|
log_message "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod 0400 "$KEYS_FILE"
|
||||||
|
log_message "Keys file fetched and permissions set to 0400."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to encrypt files or directories
|
||||||
|
encrypt_file_or_directory() {
|
||||||
|
local file="$1"
|
||||||
|
if [[ -d "$file" ]]; then
|
||||||
|
for f in "$file"/*; do
|
||||||
|
encrypt_file_or_directory "$f"
|
||||||
|
done
|
||||||
|
elif [[ -f "$file" ]]; then
|
||||||
|
fetch_keys_if_missing
|
||||||
|
local output_file="${file}.age"
|
||||||
|
age -R "$KEYS_FILE" "$file" >"$output_file"
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
log_message "File encrypted successfully: $output_file"
|
||||||
|
else
|
||||||
|
log_message "Error: Failed to encrypt file '$file'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to decrypt files or directories
|
||||||
|
decrypt_file_or_directory() {
|
||||||
|
local file="$1"
|
||||||
|
if [[ -d "$file" ]]; then
|
||||||
|
for f in "$file"/*.age; do
|
||||||
|
decrypt_file_or_directory "$f"
|
||||||
|
done
|
||||||
|
elif [[ -f "$file" ]]; then
|
||||||
|
fetch_keys_if_missing
|
||||||
|
local output_file="${file%.age}"
|
||||||
|
age -d -i "$KEYS_FILE" "$file" >"$output_file"
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
log_message "File decrypted successfully: $output_file"
|
||||||
|
else
|
||||||
|
log_message "Error: Failed to decrypt file '$file'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main logic
|
||||||
|
case "$1" in
|
||||||
|
e|enc|encrypt)
|
||||||
|
if [[ $# -lt 2 ]]; then
|
||||||
|
log_message "Error: No file or directory specified for encryption."
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
encrypt_file_or_directory "$2"
|
||||||
|
;;
|
||||||
|
d|dec|decrypt)
|
||||||
|
if [[ $# -lt 2 ]]; then
|
||||||
|
log_message "Error: No file or directory specified for decryption."
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
decrypt_file_or_directory "$2"
|
||||||
|
;;
|
||||||
|
help|--help)
|
||||||
|
print_help
|
||||||
|
;;
|
||||||
|
version|--version)
|
||||||
|
print_version
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log_message "Error: Unknown command '$1'"
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# vim: ft=bash:syn=sh:ts=2:sw=2:et:ai:nowrap
|
||||||
62
local/bin/ad
Executable file
62
local/bin/ad
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# age decrypt file with github keys
|
||||||
|
|
||||||
|
# Use ENV or default values for keys file and source
|
||||||
|
KEYS_FILE="${AGE_KEYSFILE:-$HOME/.ssh/keys.txt}"
|
||||||
|
KEYS_SOURCE="${AGE_KEYSSOURCE:-https://github.com/ivuorinen.keys}"
|
||||||
|
|
||||||
|
# Check for required commands
|
||||||
|
if ! command -v age &>/dev/null; then
|
||||||
|
echo "Error: age is not installed. Please install it to continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
echo "Error: curl is not installed. Please install it to continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure a file is provided
|
||||||
|
if [[ $# -lt 1 ]]; then
|
||||||
|
echo "Usage: $0 <file-to-decrypt>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE="$1"
|
||||||
|
if [[ ! -f "$FILE" ]]; then
|
||||||
|
echo "Error: File '$FILE' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check if keys file exists, otherwise fetch it
|
||||||
|
if [[ ! -f "$KEYS_FILE" ]]; then
|
||||||
|
echo "Keys file '$KEYS_FILE' not found. Attempting to fetch from $KEYS_SOURCE..."
|
||||||
|
|
||||||
|
# Create the directory if it doesn't exist
|
||||||
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
|
|
||||||
|
# Fetch the keys and save to the file
|
||||||
|
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
||||||
|
|
||||||
|
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
||||||
|
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set permissions to 0400
|
||||||
|
chmod 0400 "$KEYS_FILE"
|
||||||
|
echo "Keys file fetched and permissions set to 0400."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Decrypt the file
|
||||||
|
OUTPUT_FILE="${FILE%.age}"
|
||||||
|
age -d -i "$KEYS_FILE" "$FILE" >"$OUTPUT_FILE"
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "File decrypted successfully: $OUTPUT_FILE"
|
||||||
|
else
|
||||||
|
echo "Error: Failed to decrypt file."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
60
local/bin/ae
Executable file
60
local/bin/ae
Executable file
@@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# age encrypt file with github keys
|
||||||
|
|
||||||
|
# Use ENV or default values for keys file and source
|
||||||
|
KEYS_FILE="${AGE_KEYSFILE:-$HOME/.ssh/keys.txt}"
|
||||||
|
KEYS_SOURCE="${AGE_KEYSSOURCE:-https://github.com/ivuorinen.keys}"
|
||||||
|
|
||||||
|
# Check for required commands
|
||||||
|
if ! command -v age &>/dev/null; then
|
||||||
|
echo "Error: age is not installed. Please install it to continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v curl &>/dev/null; then
|
||||||
|
echo "Error: curl is not installed. Please install it to continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure a file is provided
|
||||||
|
if [[ $# -lt 1 ]]; then
|
||||||
|
echo "Usage: $0 <file-to-encrypt>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE="$1"
|
||||||
|
if [[ ! -f "$FILE" ]]; then
|
||||||
|
echo "Error: File '$FILE' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if keys file exists, otherwise fetch it
|
||||||
|
if [[ ! -f "$KEYS_FILE" ]]; then
|
||||||
|
echo "Keys file '$KEYS_FILE' not found. Attempting to fetch from $KEYS_SOURCE..."
|
||||||
|
|
||||||
|
# Create the directory if it doesn't exist
|
||||||
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
|
|
||||||
|
# Fetch the keys and save to the file
|
||||||
|
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
||||||
|
|
||||||
|
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
||||||
|
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set permissions to 0400
|
||||||
|
chmod 0400 "$KEYS_FILE"
|
||||||
|
echo "Keys file fetched and permissions set to 0400."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Encrypt the file
|
||||||
|
OUTPUT_FILE="${FILE}.age"
|
||||||
|
age -R "$KEYS_FILE" "$FILE" >"$OUTPUT_FILE"
|
||||||
|
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "File encrypted successfully: $OUTPUT_FILE"
|
||||||
|
else
|
||||||
|
echo "Error: Failed to encrypt file."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Submodule local/bin/asdf updated: 753c0b7265...54d15e3fa6
102
local/bin/dfm
102
local/bin/dfm
@@ -169,7 +169,7 @@ section_install()
|
|||||||
;;
|
;;
|
||||||
asdf)
|
asdf)
|
||||||
msg "Installing asdf..."
|
msg "Installing asdf..."
|
||||||
bash "$DOTFILES/scripts/install-asdf.sh both" \
|
$0 asdf plugins-add \
|
||||||
&& msg_yay "asdf installed!"
|
&& msg_yay "asdf installed!"
|
||||||
;;
|
;;
|
||||||
cargo)
|
cargo)
|
||||||
@@ -371,21 +371,111 @@ section_asdf()
|
|||||||
{
|
{
|
||||||
USAGE_PREFIX="$SCRIPT asdf <command>"
|
USAGE_PREFIX="$SCRIPT asdf <command>"
|
||||||
MENU=(
|
MENU=(
|
||||||
"install:Install asdf"
|
|
||||||
"current:Show asdf current versions"
|
"current:Show asdf current versions"
|
||||||
"global:Show asdf global versions"
|
"global:Show asdf global versions"
|
||||||
"installed:Show asdf installed versions"
|
"installed:Show asdf installed versions"
|
||||||
"local:Show asdf local versions"
|
"local:Show asdf local versions"
|
||||||
|
"plugins-add:Add and update direnv and asdf-plugin-manager, and all other plugins"
|
||||||
|
"plugins-update:Update all asdf plugins"
|
||||||
|
"reset:Reset asdf plugins"
|
||||||
"versions:Show asdf versions"
|
"versions:Show asdf versions"
|
||||||
"where:Show asdf where"
|
"where:Show asdf where"
|
||||||
"which:Show asdf which"
|
"which:Show asdf which"
|
||||||
)
|
)
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install)
|
plugins-update)
|
||||||
msg "Installing asdf..."
|
APM_BIN="$(asdf where asdf-plugin-manager)/bin/asdf-plugin-manager"
|
||||||
bash "$DOTFILES/scripts/install-asdf.sh both" \
|
|
||||||
&& msg_yay "asdf installed!"
|
msgr run "Updating all asdf plugins"
|
||||||
|
$APM_BIN update-all
|
||||||
|
$APM_BIN export > "$ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME"
|
||||||
|
msgr run_done "Updated all plugins"
|
||||||
|
;;
|
||||||
|
plugins-add)
|
||||||
|
X_GH_BIN="$DOTFILES/local/bin/x-gh-get-latest-version"
|
||||||
|
LATEST_APM="$($X_GH_BIN asdf-community/asdf-plugin-manager | sed 's/^v//')"
|
||||||
|
LATEST_DIRENV="$($X_GH_BIN asdf-community/asdf-direnv)"
|
||||||
|
PLUGIN_VERSIONS="$DOTFILES/config/asdf/plugin-versions"
|
||||||
|
APM_BIN="$HOME/.local/bin/asdf/shims/asdf-plugin-manager"
|
||||||
|
|
||||||
|
msgr run "Adding and updating direnv and asdf-plugin-manager"
|
||||||
|
asdf plugin add direnv https://github.com/asdf-community/asdf-direnv.git
|
||||||
|
asdf global direnv "$LATEST_DIRENV"
|
||||||
|
asdf install direnv "$LATEST_DIRENV"
|
||||||
|
|
||||||
|
asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git
|
||||||
|
asdf global asdf-plugin-manager "$LATEST_APM"
|
||||||
|
asdf install asdf-plugin-manager "$LATEST_APM"
|
||||||
|
asdf reshim
|
||||||
|
msgr run_done "direnv and asdf-plugin-manager added and updated"
|
||||||
|
|
||||||
|
msgr run "Reset plugin-versions file to the original using git"
|
||||||
|
if git ls-files --error-unmatch "$PLUGIN_VERSIONS" > /dev/null 2>&1; then
|
||||||
|
git checkout -- "$PLUGIN_VERSIONS"
|
||||||
|
fi
|
||||||
|
msgr run_done "Reset plugin-versions file"
|
||||||
|
|
||||||
|
msgr run "Adding all plugins with asdf-plugin-manager"
|
||||||
|
"$APM_BIN" add-all
|
||||||
|
msgr run_done "Added all plugins with asdf-plugin-manager"
|
||||||
|
|
||||||
|
msgr run "Install all plugins"
|
||||||
|
PLUGINS=$($APM_BIN list | awk -F ' ' '{print $1}' | sort)
|
||||||
|
for P in $PLUGINS; do
|
||||||
|
msgr run "Installing $P"
|
||||||
|
asdf install "$P" latest
|
||||||
|
asdf global "$P" latest
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
msgr run_done "Installed all plugins"
|
||||||
|
|
||||||
|
msgr run "Reshimming"
|
||||||
|
asdf reshim
|
||||||
|
msgr run_done "Reshimmed"
|
||||||
|
;;
|
||||||
|
plugins-remove)
|
||||||
|
PLUGIN_VERSIONS="$DOTFILES/config/asdf/plugin-versions"
|
||||||
|
|
||||||
|
msgr run "Remove installed plugins"
|
||||||
|
INSTALLED_ASDF_PLUGINS=$(asdf list | grep -vE "direnv|asdf-plugin-manager" | grep -v "^ ")
|
||||||
|
for P in $INSTALLED_ASDF_PLUGINS; do
|
||||||
|
asdf plugin remove "$P"
|
||||||
|
msgr nested_done "Removed $P"
|
||||||
|
done
|
||||||
|
|
||||||
|
msgr run "Reset plugin-versions file to the original using git"
|
||||||
|
if git ls-files --error-unmatch "$PLUGIN_VERSIONS" > /dev/null 2>&1; then
|
||||||
|
git checkout -- "$PLUGIN_VERSIONS"
|
||||||
|
fi
|
||||||
|
msgr run_done "Reset plugin-versions file"
|
||||||
|
|
||||||
|
msgr run_done "Remove plugins done!"
|
||||||
|
;;
|
||||||
|
reset)
|
||||||
|
APM_BIN="$(asdf where asdf-plugin-manager)/bin/asdf-plugin-manager"
|
||||||
|
|
||||||
|
msgr run "Get currently installed plugins, remove those that are not defined"
|
||||||
|
$0 asdf plugins-remove
|
||||||
|
$0 asdf plugins-add
|
||||||
|
$0 asdf fixtoolversions
|
||||||
|
asdf reshim
|
||||||
|
msgr yay "Reset asdf plugins done!"
|
||||||
|
;;
|
||||||
|
fixtoolversions)
|
||||||
|
ASDF_TOOL_VERSIONS_FILE="$DOTFILES/base/tool-versions"
|
||||||
|
ASDF_TOOL_FILE_PLUGINS=$(awk '{print $1 " " $2}' "$ASDF_TOOL_VERSIONS_FILE")
|
||||||
|
APM_BIN="$(asdf where asdf-plugin-manager)/bin/asdf-plugin-manager"
|
||||||
|
|
||||||
|
msgr run "Loading $ASDF_TOOL_VERSIONS_FILE and collecting installed"
|
||||||
|
ASDF_PLUGINS_DEFINED=$($APM_BIN list | awk -F ' ' '{print $1}')
|
||||||
|
|
||||||
|
echo "$ASDF_TOOL_FILE_PLUGINS" | \
|
||||||
|
grep -Fxv -f <(echo "$ASDF_PLUGINS_DEFINED") > tmp && \
|
||||||
|
mv tmp "$ASDF_TOOL_VERSIONS_FILE"
|
||||||
|
|
||||||
|
msgr run_done "Fixed $ASDF_TOOL_VERSIONS_FILE"
|
||||||
;;
|
;;
|
||||||
current)
|
current)
|
||||||
asdf current
|
asdf current
|
||||||
|
|||||||
Submodule tools/dotbot updated: 7e6ec66718...d1e83dc75a
Reference in New Issue
Block a user