Initialize Nix overlay repository with blueprint, goose-cli, and docs
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
This commit is contained in:
19
packages/default/default.nix
Normal file
19
packages/default/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
perSystem,
|
||||
...
|
||||
}:
|
||||
let
|
||||
allPackages = perSystem.self;
|
||||
|
||||
# Filter to visible, runnable packages
|
||||
visibleNames = builtins.filter (
|
||||
name: name != "default" && !(allPackages.${name}.passthru.hideFromDocs or false)
|
||||
) (builtins.attrNames allPackages);
|
||||
|
||||
# Build "name\tdescription" lines
|
||||
packageLines = map (name: "${name}\t${allPackages.${name}.meta.description or ""}") visibleNames;
|
||||
|
||||
packageList = builtins.concatStringsSep "\n" packageLines;
|
||||
in
|
||||
pkgs.callPackage ./package.nix { inherit packageList; }
|
||||
60
packages/default/package.nix
Normal file
60
packages/default/package.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user