feature/hm-options #2
Reference in New Issue
Block a user
Delete Branch "feature/hm-options"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a new
hm-optionsMCP server for Home Manager options, mirroring the functionality ofnixos-optionsbuttargeting the home-manager repository instead of nixpkgs.
Changes
New Components
internal/homemanager/- Home Manager indexer with channel aliases (hm-unstable,hm-stable,release-24.11, etc.)internal/options/- SharedIndexerinterface used by both implementationscmd/hm-options/- CLI entry point with identical interface tonixos-optionsnix/hm-options-module.nix- NixOS module for systemd deploymentModified Components
internal/mcp/server.go- AddedServerConfigto parameterize server name, instructions, and defaultchannel
internal/mcp/handlers.go- Acceptoptions.Indexerinterface instead of concrete*nixos.Indexernix/package.nix- Parameterized for building both packagesflake.nix- Addedhm-optionspackage andhm-options-mcpNixOS moduleDocumentation
Version Bump
Usage
The options.json parser expected declarations as []string (NixOS format), but Home Manager uses [{name, url}] objects. This caused most HM options to be silently skipped during parsing (27 vs 4880 options). Changes: - Parse declarations as json.RawMessage and try both formats - Handle HM path format <home-manager/modules/...> in normalizeDeclarationPath - Add /modules/ marker for HM store paths Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>