Add the complete overlay structure using numtide/blueprint with: - Two overlay strategies (default and shared-nixpkgs) - goose-cli package with custom librusty_v8 fetcher - Interactive package launcher via fzf - Flake input caching utility - Comprehensive README and AGENTS.md documentation
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
writeShellApplication,
|
|
fzf,
|
|
nix,
|
|
util-linux,
|
|
packageList,
|
|
}:
|
|
|
|
let
|
|
packageListFile = builtins.toFile "millerson-overlay-packages.tsv" packageList;
|
|
in
|
|
writeShellApplication {
|
|
name = "millerson-overlay-launcher";
|
|
|
|
runtimeInputs = [
|
|
fzf
|
|
nix
|
|
util-linux # column
|
|
];
|
|
|
|
text = ''
|
|
# Format for fzf: "name description" (tab-aligned)
|
|
entries=$(column -t -s $'\t' < "${packageListFile}")
|
|
|
|
if [[ -z $entries ]]; then
|
|
echo "No packages found" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Let user pick with fzf
|
|
selected=$(echo "$entries" | fzf \
|
|
--header="Select an pkg to run (ESC to cancel)" \
|
|
--preview-window=hidden \
|
|
--no-multi \
|
|
--height=~40% \
|
|
--layout=reverse) || exit 0
|
|
|
|
# Extract package name (first word)
|
|
pkg_name=$(echo "$selected" | awk '{print $1}')
|
|
|
|
if [[ -z $pkg_name ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
echo "→ Running: nix run git.millerson.name/alex/nix-overlay.git#$pkg_name"
|
|
exec nix run "git.millerson.name/alex/nix-overlay.git#$pkg_name"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Interactive fzf launcher for millerson-overlay.nix packages";
|
|
license = licenses.mit;
|
|
mainProgram = "millerson-overlay-launcher";
|
|
platforms = platforms.all;
|
|
};
|
|
|
|
passthru = {
|
|
hideFromDocs = true;
|
|
};
|
|
}
|