This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools: add usage.kdl specs and zsh tab completion for s

Add usage.kdl (https://usage.jdx.dev/spec/) files for all 32 tools
describing their CLI interface. Each tool exposes its spec as a string
via passthru.usage (builtins.readFile ./usage.kdl).

The s wrapper now includes a zsh completion function that:
- Instantly completes package names (baked in at build time)
- Lazily fetches per-tool usage specs via nix eval on first use
- Caches specs keyed by flake narHash for invalidation

+363 -93
+2 -2
tools/age-detect/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.age-detect = pkgs.writeShellApplication { 6 + packages.age-detect = (pkgs.writeShellApplication { 7 7 name = "age-detect"; 8 8 runtimeInputs = 9 9 with pkgs; ··· 19 19 pkgs.age-plugin-se 20 20 ]); 21 21 text = builtins.readFile ./age-detect; 22 - }; 22 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 23 23 }; 24 24 }
+6
tools/age-detect/usage.kdl
··· 1 + bin "age-detect" 2 + about "Detect connected age-compatible security keys" 3 + 4 + cmd "detect" help="Detect connected security keys (default)" 5 + 6 + flag "-h --help" help="Show help message"
+2 -2
tools/android-webcam/flake-module.nix
··· 6 6 ffmpeg-placebo = pkgs.ffmpeg.override { withPlacebo = true; }; 7 7 in 8 8 { 9 - packages.android-webcam = pkgs.writeShellApplication { 9 + packages.android-webcam = (pkgs.writeShellApplication { 10 10 name = "android-webcam"; 11 11 runtimeInputs = [ 12 12 pkgs.scrcpy ··· 16 16 text = builtins.replaceStrings [ "@shaderPath@" ] [ "${./ascii.hook}" ] ( 17 17 builtins.readFile ./android-webcam.sh 18 18 ); 19 - }; 19 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 20 20 }; 21 21 }
+6
tools/android-webcam/usage.kdl
··· 1 + bin "android-webcam" 2 + about "Stream Android phone camera to virtual webcam via scrcpy" 3 + 4 + flag "--ascii" help="Enable ASCII art filter mode" 5 + 6 + arg "[size]" help="ASCII character size 1-20 (default: 6, only with --ascii)"
+2 -2
tools/build-installer-iso/flake-module.nix
··· 168 168 perSystem = 169 169 { pkgs, ... }: 170 170 { 171 - packages.build-installer-iso = pkgs.writeShellApplication { 171 + packages.build-installer-iso = (pkgs.writeShellApplication { 172 172 name = "build-installer-iso"; 173 173 runtimeInputs = with pkgs; [ 174 174 xorriso ··· 180 180 export FLAKE_ROOT="${self}" 181 181 ${builtins.readFile ./build-installer-iso.sh} 182 182 ''; 183 - }; 183 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 184 184 }; 185 185 }
+8
tools/build-installer-iso/usage.kdl
··· 1 + bin "build-installer-iso" 2 + about "Build a NixOS installer ISO with custom configuration" 3 + 4 + flag "-o --output <file>" help="Output ISO file (default: installer.iso)" 5 + flag "-a --arch <arch>" help="Architecture: x86_64-linux or aarch64-linux (default: x86_64-linux)" 6 + flag "-c --config <dir>" help="Configuration directory containing installer-config.json and files/" 7 + flag "-f --flake <url>" help="Flake URL to install automatically" 8 + flag "-h --help" help="Show help message"
+2 -2
tools/flaxget/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.flaxget = pkgs.writeShellApplication { 6 + packages.flaxget = (pkgs.writeShellApplication { 7 7 name = "flaxget"; 8 8 runtimeInputs = [ 9 9 pkgs.curl ··· 12 12 pkgs.aria2 13 13 ]; 14 14 text = builtins.readFile ./flaxget.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+4
tools/flaxget/usage.kdl
··· 1 + bin "flaxget" 2 + about "Download files from flax.lassul.us with interactive selection" 3 + 4 + flag "-s --stream" help="Stream files to mpv while downloading"
+2 -2
tools/gh-act/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.gh-act = pkgs.writeShellApplication { 6 + packages.gh-act = (pkgs.writeShellApplication { 7 7 name = "gh-act"; 8 8 runtimeInputs = with pkgs; [ 9 9 yq ··· 38 38 done 39 39 done 40 40 ''; 41 - }; 41 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 42 42 }; 43 43 }
+4
tools/gh-act/usage.kdl
··· 1 + bin "gh-act" 2 + about "Run GitHub Actions workflow steps locally" 3 + 4 + arg "[workflow]" help="Path to workflow YAML file (default: .github/workflows/ci.yml)"
+2
tools/gpd-rumble/flake-module.nix
··· 19 19 cp gpd-rumble $out/bin/ 20 20 ''; 21 21 22 + passthru.usage = builtins.readFile ./usage.kdl; 23 + 22 24 meta = { 23 25 description = "Trigger vibration motor on GPD Win Mini 2025"; 24 26 platforms = lib.platforms.linux;
+6
tools/gpd-rumble/usage.kdl
··· 1 + bin "gpd-rumble" 2 + about "Trigger vibration motor on GPD Win Mini 2025" 3 + 4 + arg "[duration_ms]" help="Vibration duration in milliseconds (default: 500)" 5 + arg "[strength_percent]" help="Vibration strength 0-100 (default: 100)" 6 + arg "[device]" help="Input device path (default: /dev/input/event2)"
+2 -2
tools/install-ssh-keys/flake-module.nix
··· 11 11 ''; 12 12 in 13 13 { 14 - packages.install-ssh-keys = pkgs.writeShellApplication { 14 + packages.install-ssh-keys = (pkgs.writeShellApplication { 15 15 name = "install-ssh-keys"; 16 16 runtimeInputs = [ ]; 17 17 text = '' ··· 33 33 34 34 echo "Appended SSH keys to /root/.ssh/authorized_keys: ${lib.concatStringsSep ", " (lib.attrNames self.keys.ssh)}" 35 35 ''; 36 - }; 36 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 37 37 }; 38 38 }
+2
tools/install-ssh-keys/usage.kdl
··· 1 + bin "install-ssh-keys" 2 + about "Install SSH authorized keys to /root/.ssh/authorized_keys"
+2 -2
tools/jellyseekrr/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.jellyseekrr = pkgs.writeShellApplication { 6 + packages.jellyseekrr = (pkgs.writeShellApplication { 7 7 name = "jellyseekrr"; 8 8 runtimeInputs = with pkgs; [ 9 9 self.packages.${pkgs.system}.menu ··· 12 12 jq 13 13 ]; 14 14 text = builtins.readFile ./jellyseekrr.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+4
tools/jellyseekrr/usage.kdl
··· 1 + bin "jellyseekrr" 2 + about "Search and request movies/TV shows via Jellyseerr" 3 + 4 + arg "<search_query>" help="Search query for movies or TV shows"
+2 -2
tools/lockscreen/flake-module.nix
··· 2 2 perSystem = 3 3 { pkgs, ... }: 4 4 { 5 - packages.lockscreen = pkgs.writeShellApplication { 5 + packages.lockscreen = (pkgs.writeShellApplication { 6 6 name = "lockscreen"; 7 7 runtimeInputs = [ 8 8 pkgs.ffmpeg ··· 17 17 START=$((RANDOM % ''${DURATION:-300})) 18 18 exec swaylock-plugin --command "mpvpaper -o \"no-audio loop start=$START\" '*' \"$VIDEO\"" "$@" 19 19 ''; 20 - }; 20 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 21 21 }; 22 22 }
+2
tools/lockscreen/usage.kdl
··· 1 + bin "lockscreen" 2 + about "Lock screen with random video background via swaylock"
+2 -2
tools/memhack/flake-module.nix
··· 12 12 }; 13 13 in 14 14 { 15 - packages.memhack = pkgs.writeShellApplication { 15 + packages.memhack = (pkgs.writeShellApplication { 16 16 name = "memhack"; 17 17 runtimeInputs = [ 18 18 pkgs.procps ··· 20 20 memhack-repl 21 21 ]; 22 22 text = builtins.readFile ./memhack.sh; 23 - }; 23 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 24 24 }; 25 25 }
+2
tools/memhack/usage.kdl
··· 1 + bin "memhack" 2 + about "Interactive memory hacking REPL for a running process"
+23 -21
tools/menu/flake-module.nix
··· 4 4 { pkgs, ... }: 5 5 { 6 6 packages.menu = 7 - if pkgs.stdenv.hostPlatform.isDarwin then 8 - (pkgs.writeShellApplication { 9 - name = "menu"; 10 - runtimeInputs = [ 11 - pkgs.choose-gui 12 - pkgs.fzf 13 - ]; 14 - text = builtins.readFile ./menu-darwin.sh; 15 - }) 16 - else if pkgs.stdenv.hostPlatform.isLinux then 17 - (pkgs.writeShellApplication { 18 - name = "menu"; 19 - runtimeInputs = [ 20 - pkgs.rofi 21 - pkgs.wofi 22 - pkgs.fzf 23 - ]; 24 - text = builtins.readFile ./menu-linux.sh; 25 - }) 26 - else 27 - throw "unsupported system"; 7 + ( 8 + if pkgs.stdenv.hostPlatform.isDarwin then 9 + (pkgs.writeShellApplication { 10 + name = "menu"; 11 + runtimeInputs = [ 12 + pkgs.choose-gui 13 + pkgs.fzf 14 + ]; 15 + text = builtins.readFile ./menu-darwin.sh; 16 + }) 17 + else if pkgs.stdenv.hostPlatform.isLinux then 18 + (pkgs.writeShellApplication { 19 + name = "menu"; 20 + runtimeInputs = [ 21 + pkgs.rofi 22 + pkgs.wofi 23 + pkgs.fzf 24 + ]; 25 + text = builtins.readFile ./menu-linux.sh; 26 + }) 27 + else 28 + throw "unsupported system" 29 + ).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 28 30 }; 29 31 }
+2
tools/menu/usage.kdl
··· 1 + bin "menu" 2 + about "Cross-platform interactive menu selector (fzf/rofi/wofi/choose)"
+2 -2
tools/mic-to-text/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.mic-to-text = pkgs.writeShellApplication { 6 + packages.mic-to-text = (pkgs.writeShellApplication { 7 7 name = "mic-to-text"; 8 8 runtimeInputs = [ 9 9 pkgs.sox ··· 11 11 pkgs.curl 12 12 ]; 13 13 text = builtins.readFile ./mic-to-text.sh; 14 - }; 14 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 15 15 }; 16 16 }
+4
tools/mic-to-text/usage.kdl
··· 1 + bin "mic-to-text" 2 + about "Record from microphone and transcribe using whisper.cpp" 3 + 4 + arg "[duration]" help="Recording duration in seconds (default: 5)"
+2 -2
tools/name-generator/flake-module.nix
··· 13 13 }; 14 14 in 15 15 { 16 - packages.name-generator = pkgs.writeShellApplication { 16 + packages.name-generator = (pkgs.writeShellApplication { 17 17 name = "name-generator"; 18 18 runtimeInputs = [ pkgs.bash ]; 19 19 text = '' ··· 52 52 # Output the generated name 53 53 echo "''${ADJECTIVES[$ADJ_INDEX]}''${SEPARATOR}''${NOUNS[$NOUN_INDEX]}" 54 54 ''; 55 - }; 55 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 56 56 }; 57 57 }
+5
tools/name-generator/usage.kdl
··· 1 + bin "name-generator" 2 + about "Generate a random name in the format adjective-noun" 3 + 4 + flag "-s --separator <char>" help="Use CHAR as separator (default: -)" 5 + flag "-h --help" help="Show help message"
+2 -2
tools/pass-otp/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, lib, ... }: 5 5 { 6 - packages.pass-otp = pkgs.writeShellApplication { 6 + packages.pass-otp = (pkgs.writeShellApplication { 7 7 name = "pass-otp"; 8 8 runtimeInputs = [ 9 9 pkgs.oath-toolkit ··· 99 99 echo "$otp_code" 100 100 fi 101 101 ''; 102 - }; 102 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 103 103 }; 104 104 }
+7
tools/pass-otp/usage.kdl
··· 1 + bin "pass-otp" 2 + about "Generate TOTP codes from OTP secrets" 3 + 4 + flag "-c --clip" help="Copy OTP code to clipboard instead of printing" 5 + flag "-h --help" help="Show help message" 6 + 7 + arg "[secret]" help="OTP secret (raw base32, otpauth:// URL, or multi-line text)"
+2 -2
tools/passmenu/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.passmenu = pkgs.writeShellApplication { 6 + packages.passmenu = (pkgs.writeShellApplication { 7 7 name = "passmenu"; 8 8 runtimeInputs = 9 9 with pkgs; ··· 66 66 fi 67 67 fi 68 68 ''; 69 - }; 69 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 70 70 }; 71 71 }
+4
tools/passmenu/usage.kdl
··· 1 + bin "passmenu" 2 + about "Interactive password selector using menu and pass" 3 + 4 + flag "--type" help="Type the password/OTP instead of copying to clipboard"
+2 -2
tools/payment-qr/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.payment-qr = pkgs.writeShellApplication { 6 + packages.payment-qr = (pkgs.writeShellApplication { 7 7 name = "payment-qr"; 8 8 runtimeInputs = [ 9 9 pkgs.qrencode 10 10 ]; 11 11 text = builtins.readFile ./payment-qr.sh; 12 - }; 12 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 13 13 }; 14 14 }
+9
tools/payment-qr/usage.kdl
··· 1 + bin "payment-qr" 2 + about "Generate SEPA payment QR codes (EPC QR code format)" 3 + 4 + flag "-n --name <name>" help="Beneficiary name (required)" 5 + flag "-i --iban <iban>" help="IBAN (required)" 6 + flag "-b --bic <bic>" help="BIC (optional, auto-detected from IBAN)" 7 + flag "-a --amount <amount>" help="Amount in EUR (e.g. 123.45)" 8 + flag "-d --desc <description>" help="Payment description/reference" 9 + flag "-h --help" help="Show help message"
+2 -2
tools/pinentry-rofi-age/flake-module.nix
··· 2 2 perSystem = 3 3 { pkgs, ... }: 4 4 { 5 - packages.pinentry-rofi-age = pkgs.writeShellApplication { 5 + packages.pinentry-rofi-age = (pkgs.writeShellApplication { 6 6 name = "pinentry-rofi-age"; 7 7 runtimeInputs = with pkgs; [ 8 8 rofi ··· 11 11 keyutils 12 12 ]; 13 13 text = builtins.readFile ./pinentry-rofi-age.sh; 14 - }; 14 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 15 15 }; 16 16 }
+4
tools/pinentry-rofi-age/usage.kdl
··· 1 + bin "pinentry-rofi-age" 2 + about "Rofi-based pinentry for age-plugin-tpm decryption with kernel keyring caching" 3 + 4 + arg "[target]" help="File being decrypted (for display purposes)"
+2 -2
tools/pinentry-rofi/flake-module.nix
··· 2 2 perSystem = 3 3 { pkgs, ... }: 4 4 { 5 - packages.pinentry-rofi = pkgs.writeShellApplication { 5 + packages.pinentry-rofi = (pkgs.writeShellApplication { 6 6 name = "pinentry-rofi"; 7 7 runtimeInputs = with pkgs; [ 8 8 rofi ··· 11 11 keyutils 12 12 ]; 13 13 text = builtins.readFile ./pinentry-rofi.sh; 14 - }; 14 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 15 15 }; 16 16 }
+2
tools/pinentry-rofi/usage.kdl
··· 1 + bin "pinentry-rofi" 2 + about "Rofi-based pinentry for SSH TPM authentication with kernel keyring caching"
+2 -2
tools/power-profile/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.power-profile = pkgs.writeShellApplication { 6 + packages.power-profile = (pkgs.writeShellApplication { 7 7 name = "power-profile"; 8 8 text = builtins.readFile ./power-profile.sh; 9 - }; 9 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 10 10 }; 11 11 }
+6
tools/power-profile/usage.kdl
··· 1 + bin "power-profile" 2 + about "Set CPU TDP power profile via ryzenadj" 3 + 4 + flag "-h --help" help="Show help message" 5 + 6 + arg "<profile>" help="Power profile: low (3W), normal (15W), high (28W), or watts as number"
+2 -2
tools/record/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, self', ... }: 5 5 { 6 - packages.record = pkgs.writeShellApplication { 6 + packages.record = (pkgs.writeShellApplication { 7 7 name = "record"; 8 8 runtimeInputs = [ 9 9 pkgs.ffmpeg ··· 12 12 ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.pulseaudio ] 13 13 ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ self'.packages.system-audio-dump ]; 14 14 text = builtins.readFile ./rec.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+7
tools/record/usage.kdl
··· 1 + bin "record" 2 + about "Record audio from a source and output WAV to stdout" 3 + 4 + flag "-l --list" help="List available audio sources" 5 + flag "-h --help" help="Show help message" 6 + 7 + arg "[source]" help="Audio source to record from (interactive selection if omitted)"
+120 -18
tools/s/flake-module.nix
··· 1 1 { self, ... }: 2 2 { 3 3 perSystem = 4 - { pkgs, ... }: 5 - { 6 - packages.s = pkgs.writers.writeDashBin "s" '' 7 - set -efu 4 + { pkgs, lib, ... }: 5 + let 6 + # Collect all completable package names 7 + packageNames = builtins.attrNames self.packages.${pkgs.system}; 8 + legacyPackageNames = 9 + let 10 + lp = self.legacyPackages.${pkgs.system} or { }; 11 + flatten = 12 + prefix: attrs: 13 + lib.concatLists ( 14 + lib.mapAttrsToList ( 15 + name: value: 16 + let 17 + path = if prefix == "" then name else "${prefix}.${name}"; 18 + in 19 + if lib.isDerivation value then 20 + [ path ] 21 + else if builtins.isAttrs value then 22 + flatten path value 23 + else 24 + [ ] 25 + ) attrs 26 + ); 27 + in 28 + flatten "" lp; 29 + allNames = packageNames ++ legacyPackageNames; 8 30 9 - # Use local checkout if it exists, otherwise fall back to self 10 - if [ -d "$HOME/src/superconfig" ]; then 11 - flake="$HOME/src/superconfig" 12 - else 13 - flake="${self}" 14 - fi 31 + completionPath = lib.makeBinPath [ 32 + pkgs.nix 33 + pkgs.jq 34 + pkgs.usage 35 + ]; 15 36 16 - if [ $# -eq 0 ]; then 17 - echo "Usage: s <package> [args...]" >&2 18 - echo "Runs a package from superconfig ($flake)" >&2 19 - exit 1 20 - fi 37 + zshCompletion = pkgs.writeText "_s" '' 38 + #compdef s 21 39 22 - pkg="$1" 23 - shift 40 + _s() { 41 + local -x PATH="${completionPath}:$PATH" 24 42 25 - exec ${pkgs.nix}/bin/nix run "$flake#$pkg" -- "$@" 43 + if (( CURRENT == 2 )); then 44 + # Complete package name 45 + local -a packages 46 + packages=( 47 + ${lib.concatMapStringsSep "\n " (name: "'${name}'") allNames} 48 + ) 49 + _describe 'package' packages 50 + else 51 + # Complete args for the selected package using usage spec 52 + local pkg="''${words[2]}" 53 + [[ -z "$pkg" ]] && return 54 + 55 + # Resolve flake path (same logic as s itself) 56 + local flake 57 + if [[ -d "$HOME/src/superconfig" ]]; then 58 + flake="$HOME/src/superconfig" 59 + else 60 + flake="${self}" 61 + fi 62 + 63 + # Cache directory 64 + local cache_dir="''${XDG_CACHE_HOME:-$HOME/.cache}/s-completions" 65 + 66 + # Get cache key from flake narHash (~0.1s) 67 + local cache_key 68 + cache_key=$(nix flake metadata "$flake" --json 2>/dev/null | jq -r '.locked.narHash // .narHash // (.lastModified | tostring)' 2>/dev/null) || return 69 + [[ -z "$cache_key" ]] && return 70 + cache_key=''${cache_key//\//_} 71 + 72 + local cached_file="$cache_dir/''${cache_key}/''${pkg}.kdl" 73 + 74 + if [[ ! -f "$cached_file" ]]; then 75 + # Cache miss: fetch usage spec via nix eval (~3.6s, first time only) 76 + mkdir -p "$cache_dir/$cache_key" 77 + local sys 78 + sys=$(nix eval --impure --raw --expr 'builtins.currentSystem' 2>/dev/null) || return 79 + nix eval "''${flake}#packages.''${sys}.''${pkg}.usage" --raw 2>/dev/null > "$cached_file" || { 80 + rm -f "$cached_file" 81 + return 82 + } 83 + # Empty file means no usage spec 84 + [[ -s "$cached_file" ]] || { rm -f "$cached_file"; return; } 85 + fi 86 + 87 + # Feed to usage complete-word (~4ms), using the ((...)) format that _arguments expects 88 + _arguments "*: :(($(usage complete-word --shell zsh -f "$cached_file" -- "''${words[@]:1}")))" 89 + fi 90 + } 91 + 92 + _s "$@" 26 93 ''; 94 + in 95 + { 96 + packages.s = (pkgs.writeShellApplication { 97 + name = "s"; 98 + runtimeInputs = [ pkgs.nix ]; 99 + text = '' 100 + # Use local checkout if it exists, otherwise fall back to self 101 + if [ -d "$HOME/src/superconfig" ]; then 102 + flake="$HOME/src/superconfig" 103 + else 104 + flake="${self}" 105 + fi 106 + 107 + if [ $# -eq 0 ]; then 108 + echo "Usage: s <package> [args...]" >&2 109 + echo "Runs a package from superconfig ($flake)" >&2 110 + exit 1 111 + fi 112 + 113 + pkg="$1" 114 + shift 115 + 116 + exec nix run "$flake#$pkg" -- "$@" 117 + ''; 118 + }).overrideAttrs (old: { 119 + buildCommand = 120 + old.buildCommand 121 + + '' 122 + mkdir -p $out/share/zsh/site-functions 123 + cp ${zshCompletion} $out/share/zsh/site-functions/_s 124 + ''; 125 + passthru = (old.passthru or { }) // { 126 + usage = builtins.readFile ./usage.kdl; 127 + }; 128 + }); 27 129 }; 28 130 }
+5
tools/s/usage.kdl
··· 1 + bin "s" 2 + about "Run a package from superconfig" 3 + 4 + arg "<package>" help="Package name to run" 5 + arg "[args...]" help="Arguments to pass to the package" var=#true
+2 -2
tools/ssh-with-age/flake-module.nix
··· 19 19 ); 20 20 in 21 21 { 22 - packages.ssh-with-age = pkgs.writeShellApplication { 22 + packages.ssh-with-age = (pkgs.writeShellApplication { 23 23 name = "ssh-with-age"; 24 24 runtimeInputs = [ 25 25 pkgs.openssh ··· 129 129 # Use the found key with SSH 130 130 ssh -i "$temp_key" "$@" 131 131 ''; 132 - }; 132 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 133 133 }; 134 134 }
+8
tools/ssh-with-age/usage.kdl
··· 1 + bin "ssh-with-age" 2 + about "SSH wrapper that tries each encrypted SSH key with the connected FIDO2 device" 3 + 4 + flag "--list-keys" help="List available encrypted SSH keys" 5 + flag "--list-devices" help="List connected FIDO2 devices" 6 + flag "-h --help" help="Show help message" 7 + 8 + arg "[ssh_options...]" help="SSH options and destination" var=#true
+2 -2
tools/ssh-yubikey/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.ssh-yubikey = inputs.wrappers.lib.wrapPackage { 6 + packages.ssh-yubikey = (inputs.wrappers.lib.wrapPackage { 7 7 pkgs = pkgs; 8 8 package = pkgs.openssh; 9 9 env = { ··· 24 24 ${envString} 25 25 ${builtins.readFile ./ssh-yubikey} 26 26 ''; 27 - }; 27 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 28 28 }; 29 29 }
+4
tools/ssh-yubikey/usage.kdl
··· 1 + bin "ssh-yubikey" 2 + about "SSH wrapper that automatically uses the correct YubiKey/Solo2 key" 3 + 4 + arg "[ssh_options...]" help="SSH options and destination" var=#true
+1
tools/stt/flake-module.nix
··· 23 23 --set PYTHONPATH ${python}/${python.sitePackages} 24 24 runHook postInstall 25 25 ''; 26 + passthru.usage = builtins.readFile ./usage.kdl; 26 27 meta.mainProgram = "stt"; 27 28 }; 28 29 };
+6
tools/stt/usage.kdl
··· 1 + bin "stt" 2 + about "Real-time streaming speech-to-text using Vosk" 3 + 4 + flag "-l --language <lang>" help="Language: en, de, fr, es, ru, cn, ja (default: en)" env="VOSK_LANG" 5 + flag "-s --size <size>" help="Model size: small, medium, large (default: small)" env="VOSK_SIZE" 6 + flag "-w --words" help="Output individual words as they are recognized"
+2 -2
tools/tor-ssh-service/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.tor-ssh-service = pkgs.writeShellApplication { 6 + packages.tor-ssh-service = (pkgs.writeShellApplication { 7 7 name = "tor-ssh-service"; 8 8 runtimeInputs = with pkgs; [ 9 9 tor ··· 13 13 qrencode 14 14 ]; 15 15 text = builtins.readFile ./tor-ssh-service.sh; 16 - }; 16 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 17 17 }; 18 18 }
+2
tools/tor-ssh-service/usage.kdl
··· 1 + bin "tor-ssh-service" 2 + about "Expose local SSH as a Tor hidden service with QR code"
+2 -2
tools/tornade/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.tornade = pkgs.writeShellApplication { 6 + packages.tornade = (pkgs.writeShellApplication { 7 7 name = "tornade"; 8 8 runtimeInputs = with pkgs; [ 9 9 tor ··· 12 12 procps 13 13 ]; 14 14 text = builtins.readFile ./tornade.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+5
tools/tornade/usage.kdl
··· 1 + bin "tornade" 2 + about "Run a command through Tor (starts ephemeral Tor instance if needed)" 3 + 4 + arg "<command>" help="Command to run through Tor" 5 + arg "[args...]" help="Arguments for the command" var=#true
+2
tools/turbomode/flake-module.nix
··· 24 24 runHook postInstall 25 25 ''; 26 26 27 + passthru.usage = builtins.readFile ./usage.kdl; 28 + 27 29 meta = { 28 30 description = "Turbo/rapid-fire mode for gamepad buttons"; 29 31 platforms = pkgs.lib.platforms.linux;
+6
tools/turbomode/usage.kdl
··· 1 + bin "turbomode" 2 + about "Turbo/rapid-fire mode for gamepad buttons" 3 + 4 + flag "--button <button>" help="Button name (a/b/x/y/lb/rb/lt/rt/start/select/thumbl/thumbr) or evdev code" 5 + flag "--device <path>" help="Input device path (auto-detects gamepad if not specified)" 6 + flag "--rate <rate>" help="Presses per second (default: 30)"
+2 -2
tools/video-webcam/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.video-webcam = pkgs.writeShellApplication { 6 + packages.video-webcam = (pkgs.writeShellApplication { 7 7 name = "video-webcam"; 8 8 runtimeInputs = [ 9 9 pkgs.ffmpeg 10 10 ]; 11 11 text = builtins.readFile ./video-webcam.sh; 12 - }; 12 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 13 13 }; 14 14 }
+8
tools/video-webcam/usage.kdl
··· 1 + bin "video-webcam" 2 + about "Stream a video file to a virtual webcam device" 3 + 4 + flag "-d --device <device>" help="v4l2 device to use (default: /dev/video0)" 5 + flag "--no-loop" help="Don't loop the video" 6 + flag "-h --help" help="Show help message" 7 + 8 + arg "<video-file>" help="Video file to stream"
+2 -2
tools/vm-boot/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.vm-boot = pkgs.writeShellApplication { 6 + packages.vm-boot = (pkgs.writeShellApplication { 7 7 name = "vm-boot"; 8 8 runtimeInputs = with pkgs; [ 9 9 qemu ··· 12 12 nix 13 13 ]; 14 14 text = builtins.readFile ./vm-boot.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+10
tools/vm-boot/usage.kdl
··· 1 + bin "vm-boot" 2 + about "Boot an ISO file in a VM with automatic architecture detection" 3 + 4 + flag "-m --memory <size>" help="Memory in MB (default: 2048)" 5 + flag "-c --cpus <count>" help="Number of CPU cores (default: 2)" 6 + flag "-a --arch <arch>" help="Force architecture (x86_64 or aarch64)" 7 + flag "-n --nographic" help="Run in text mode without graphics" 8 + flag "-h --help" help="Show help message" 9 + 10 + arg "<iso_file>" help="ISO file to boot"
+2 -2
tools/whatsong/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.whatsong = pkgs.writeShellApplication { 6 + packages.whatsong = (pkgs.writeShellApplication { 7 7 name = "whatsong"; 8 8 runtimeInputs = [ 9 9 pkgs.sox ··· 12 12 pkgs.yt-dlp 13 13 ]; 14 14 text = builtins.readFile ./whatsong.sh; 15 - }; 15 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 16 16 }; 17 17 }
+4
tools/whatsong/usage.kdl
··· 1 + bin "whatsong" 2 + about "Identify a song from microphone audio and find it on YouTube" 3 + 4 + arg "[duration]" help="Recording duration in seconds (default: 5)"
+2 -2
tools/wifi-qr/flake-module.nix
··· 3 3 perSystem = 4 4 { pkgs, ... }: 5 5 { 6 - packages.wifi-qr = pkgs.writeShellApplication { 6 + packages.wifi-qr = (pkgs.writeShellApplication { 7 7 name = "wifi-qr"; 8 8 runtimeInputs = [ 9 9 pkgs.zbar 10 10 pkgs.gawk 11 11 ]; 12 12 text = builtins.readFile ./wifi-qr.sh; 13 - }; 13 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 14 14 }; 15 15 }
+2
tools/wifi-qr/usage.kdl
··· 1 + bin "wifi-qr" 2 + about "Scan a WiFi QR code and connect to the network"
+2 -2
tools/workspace-manager/flake-module.nix
··· 6 6 python = pkgs.python3; 7 7 in 8 8 { 9 - packages.workspace-manager = pkgs.writeShellApplication { 9 + packages.workspace-manager = (pkgs.writeShellApplication { 10 10 name = "workspace-manager"; 11 11 runtimeInputs = [ 12 12 pkgs.socat 13 13 pkgs.jq 14 14 ]; 15 15 text = builtins.readFile ./workspace-manager.sh; 16 - }; 16 + }).overrideAttrs { passthru.usage = builtins.readFile ./usage.kdl; }; 17 17 18 18 packages.workspace-manager-daemon = pkgs.stdenv.mkDerivation { 19 19 pname = "workspace-manager-daemon";
+7
tools/workspace-manager/usage.kdl
··· 1 + bin "workspace-manager" 2 + about "Query workspace-manager-daemon for current workspace and directory info" 3 + 4 + cmd "dir" help="Print the directory for the current workspace" 5 + cmd "workspace" help="Print the current workspace name" 6 + cmd "status" help="Check if daemon is running and print status" 7 + cmd "help" help="Show help message"