feat(github): add auto-conventional-commit hook with opencode integration
- Add prepare-commit-msg git hook that generates conventional commit messages - Modularize fish configuration with separate conf.d files - Convert configuration files from .text to .source format for structured data - Add sops-nix SOPS configuration with explicit secret definitions - Upgrade age identity to single key file management approach - Add system activation script for age key management - Generate .sops.yaml for SOPS creation rules - Restructure README.md with improved table and cleaner formatting - Refactor config files to use pkgs.formats.json/toml generators - Implement YAML format for ashell and walker service configurations - Update SSH config source to use sops secrets - Convert zed and other config files to use structured .source format
This commit is contained in:
+110
-97
@@ -7,64 +7,78 @@
|
||||
'')
|
||||
];
|
||||
xdg.configFile = {
|
||||
"fish/config.fish" = {
|
||||
text = ''
|
||||
for secret in discordo openrouter github twt gemini context7 exa
|
||||
if test -f /run/agenix/$secret
|
||||
set -l val (cat /run/agenix/$secret)
|
||||
set -l up (string upper $secret)
|
||||
switch $secret
|
||||
case discordo
|
||||
set -gx DISCORDO_TOKEN $val
|
||||
set -gx OXICORD_TOKEN $val
|
||||
case openrouter gemini context7 exa
|
||||
set -gx "$up"_API_KEY $val
|
||||
case '*'
|
||||
set -gx "$up"_TOKEN $val
|
||||
end
|
||||
# ── Modular fish conf.d ──────────────────────────────────────────────────
|
||||
# Each file under fish/conf.d/ is sourced automatically by fish at startup,
|
||||
# sorted lexicographically. We use numeric prefixes for ordering.
|
||||
|
||||
# 00: Environment variables
|
||||
"fish/conf.d/00-env.fish".text = ''
|
||||
set -gx GNUPGHOME $HOME/.config/gnupg
|
||||
set -gx NIXPKGS_ALLOW_UNFREE 1
|
||||
set -gx NIXPKGS_ALLOW_INSECURE 1
|
||||
set -gx EDITOR nvim
|
||||
set -gx VISUAL nvim
|
||||
set -g fish_greeting
|
||||
'';
|
||||
|
||||
# 01: SOPS secret loader
|
||||
"fish/conf.d/01-secrets.fish".text = ''
|
||||
for secret in discordo openrouter github twt gemini context7 exa
|
||||
if test -f /run/secrets/$secret
|
||||
set -l val (cat /run/secrets/$secret)
|
||||
set -l up (string upper $secret)
|
||||
switch $secret
|
||||
case discordo
|
||||
set -gx DISCORDO_TOKEN $val
|
||||
set -gx OXICORD_TOKEN $val
|
||||
case openrouter gemini context7 exa
|
||||
set -gx "$up"_API_KEY $val
|
||||
case '*'
|
||||
set -gx "$up"_TOKEN $val
|
||||
end
|
||||
end
|
||||
set -gx GNUPGHOME $HOME/.config/gnupg
|
||||
set -gx NIXPKGS_ALLOW_UNFREE 1
|
||||
set -gx NIXPKGS_ALLOW_INSECURE 1
|
||||
set -gx EDITOR nvim
|
||||
set -gx VISUAL nvim
|
||||
set -g fish_greeting
|
||||
# Vi keybindings
|
||||
fish_vi_key_bindings
|
||||
# Custom key bindings function (REQUIRED to properly unbind keys)
|
||||
function fish_user_key_bindings
|
||||
# Custom bindings
|
||||
for mode in insert default
|
||||
bind -M $mode ctrl-backspace backward-kill-word
|
||||
bind -M $mode ctrl-delete kill-word
|
||||
bind -M $mode alt-backspace backward-kill-token
|
||||
bind -M $mode alt-delete kill-token
|
||||
bind -M $mode ctrl-z undo
|
||||
end
|
||||
bind -M insert \cx\ce edit_command_buffer
|
||||
bind -M default \cx\ce edit_command_buffer
|
||||
bind -M default up history-prefix-search-backward
|
||||
bind -M default down history-prefix-search-forward
|
||||
end
|
||||
'';
|
||||
|
||||
# 02: Vi key bindings and cursor shapes
|
||||
"fish/conf.d/02-key-bindings.fish".text = ''
|
||||
fish_vi_key_bindings
|
||||
|
||||
function fish_user_key_bindings
|
||||
for mode in insert default
|
||||
bind -M $mode ctrl-backspace backward-kill-word
|
||||
bind -M $mode ctrl-delete kill-word
|
||||
bind -M $mode alt-backspace backward-kill-token
|
||||
bind -M $mode alt-delete kill-token
|
||||
bind -M $mode ctrl-z undo
|
||||
end
|
||||
# Cursor shapes per mode
|
||||
set fish_cursor_default block
|
||||
set fish_cursor_insert line
|
||||
set fish_cursor_replace_one underscore
|
||||
set fish_cursor_visual block
|
||||
# Syntax colors
|
||||
set -g fish_color_autosuggestion brblack
|
||||
set -g fish_color_command blue
|
||||
set -g fish_color_error red
|
||||
set -g fish_color_param normal
|
||||
# Search highlight
|
||||
set -g fish_color_search_match --background=normal
|
||||
# Plugin settings
|
||||
set -Ux fifc_editor nvim
|
||||
set -U fifc_keybinding \cv
|
||||
set -g __done_min_cmd_duration 10000
|
||||
'';
|
||||
};
|
||||
bind -M insert \cx\ce edit_command_buffer
|
||||
bind -M default \cx\ce edit_command_buffer
|
||||
bind -M default up history-prefix-search-backward
|
||||
bind -M default down history-prefix-search-forward
|
||||
end
|
||||
|
||||
set fish_cursor_default block
|
||||
set fish_cursor_insert line
|
||||
set fish_cursor_replace_one underscore
|
||||
set fish_cursor_visual block
|
||||
'';
|
||||
|
||||
# 03: Syntax highlighting colors
|
||||
"fish/conf.d/03-syntax.fish".text = ''
|
||||
set -g fish_color_autosuggestion brblack
|
||||
set -g fish_color_command blue
|
||||
set -g fish_color_error red
|
||||
set -g fish_color_param normal
|
||||
set -g fish_color_search_match --background=normal
|
||||
'';
|
||||
|
||||
# 04: Plugin settings
|
||||
"fish/conf.d/04-plugins.fish".text = ''
|
||||
set -Ux fifc_editor nvim
|
||||
set -U fifc_keybinding \cv
|
||||
set -g __done_min_cmd_duration 10000
|
||||
'';
|
||||
"fish/functions/extract.fish" = {
|
||||
text = ''
|
||||
function extract
|
||||
@@ -166,47 +180,46 @@
|
||||
end
|
||||
'';
|
||||
};
|
||||
"fish/conf.d/aliases.fish" = {
|
||||
text = ''
|
||||
alias cleanup="sudo nix-collect-garbage --delete-older-than 1d"
|
||||
alias listgen="sudo nix-env -p /nix/var/nix/profiles/system --list-generations"
|
||||
alias nixremove="nix-store --gc"
|
||||
alias bloat="nix path-info -Sh /run/current-system"
|
||||
alias cleanram="sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
|
||||
alias trimall="sudo fstrim -va"
|
||||
alias c="clear"
|
||||
alias add="git add ."
|
||||
alias commit="git commit"
|
||||
alias push="git push"
|
||||
alias pull="git pull"
|
||||
alias diff="git diff --staged"
|
||||
alias gcld="git clone --depth 1"
|
||||
alias koji="meteor"
|
||||
alias gitui="lazygit"
|
||||
alias ls="eza -lah --grid -s modified --smart-group --group-directories-first --icons"
|
||||
alias l="eza -ah --grid -s modified --smart-group --group-directories-first --icons"
|
||||
alias tree="eza --tree --icons --tree"
|
||||
alias cat="${pkgs.bat}/bin/bat --paging=never --theme gruvbox-dark"
|
||||
alias us="systemctl --user"
|
||||
alias rs="sudo systemctl"
|
||||
alias zed="zeditor"
|
||||
alias nl="nl -ba"
|
||||
alias cp="cp -riv"
|
||||
alias mv="mv -iv"
|
||||
alias mkdir="mkdir -pv"
|
||||
alias less="bat -p --theme gruvbox-dark"
|
||||
alias myip="curl ip.severijnse.eu"
|
||||
alias pscpu="ps -eo pid,ppid,cmd,%mem,%cpu,etime --sort=-%cpu | head -n 21"
|
||||
alias psmem="ps -eo pid,ppid,cmd,%mem,%cpu,etime --sort=-%mem | head -n 21"
|
||||
alias weer="weather"
|
||||
alias v="nvim"
|
||||
alias copy="wl-copy"
|
||||
alias send="croc"
|
||||
alias img="loupe"
|
||||
alias cat-md="glow"
|
||||
alias du="dust"
|
||||
alias df="duf"
|
||||
'';
|
||||
};
|
||||
# 05: Aliases
|
||||
"fish/conf.d/05-aliases.fish".text = ''
|
||||
alias cleanup="sudo nix-collect-garbage --delete-older-than 1d"
|
||||
alias listgen="sudo nix-env -p /nix/var/nix/profiles/system --list-generations"
|
||||
alias nixremove="nix-store --gc"
|
||||
alias bloat="nix path-info -Sh /run/current-system"
|
||||
alias cleanram="sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
|
||||
alias trimall="sudo fstrim -va"
|
||||
alias c="clear"
|
||||
alias add="git add ."
|
||||
alias commit="git commit"
|
||||
alias push="git push"
|
||||
alias pull="git pull"
|
||||
alias diff="git diff --staged"
|
||||
alias gcld="git clone --depth 1"
|
||||
alias koji="meteor"
|
||||
alias gitui="lazygit"
|
||||
alias ls="eza -lah --grid -s modified --smart-group --group-directories-first --icons"
|
||||
alias l="eza -ah --grid -s modified --smart-group --group-directories-first --icons"
|
||||
alias tree="eza --tree --icons --tree"
|
||||
alias cat="${pkgs.bat}/bin/bat --paging=never --theme gruvbox-dark"
|
||||
alias us="systemctl --user"
|
||||
alias rs="sudo systemctl"
|
||||
alias zed="zeditor"
|
||||
alias nl="nl -ba"
|
||||
alias cp="cp -riv"
|
||||
alias mv="mv -iv"
|
||||
alias mkdir="mkdir -pv"
|
||||
alias less="bat -p --theme gruvbox-dark"
|
||||
alias myip="curl ip.severijnse.eu"
|
||||
alias pscpu="ps -eo pid,ppid,cmd,%mem,%cpu,etime --sort=-%cpu | head -n 21"
|
||||
alias psmem="ps -eo pid,ppid,cmd,%mem,%cpu,etime --sort=-%mem | head -n 21"
|
||||
alias weer="weather"
|
||||
alias v="nvim"
|
||||
alias copy="wl-copy"
|
||||
alias send="croc"
|
||||
alias img="loupe"
|
||||
alias cat-md="glow"
|
||||
alias du="dust"
|
||||
alias df="duf"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user