Skip to content

feat(nix): add overlay and make package overridable#7229

Closed
yzx9 wants to merge 3 commits into
NousResearch:mainfrom
yzx9:feature/nix-overlay
Closed

feat(nix): add overlay and make package overridable#7229
yzx9 wants to merge 3 commits into
NousResearch:mainfrom
yzx9:feature/nix-overlay

Conversation

@yzx9

@yzx9 yzx9 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR fixes the Nix experience, especially when overriding the package.

Related Issue

Fixes #4594

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • The package now takes dependency-groups as a parameter for more flexible builds.
  • Moved the main Hermes Agent package definition from nix/packages.nix to a new, modularized nix/hermes-agent.nix, improving maintainability and reusability.
  • The package now takes dependency-groups as a parameter for more flexible builds.
  • Added nix/overlays.nix, providing a Nix overlay that exposes the Hermes Agent package for easier consumption in external Nix projects.
  • Add uv2nix override for matrix-nio

How to Test

  1. Set up hermes-agent on NixOS by following our documentation
  2. Add matrix as messaging platform, and switch to the new generation will fall into [Setup]: Matrix does not work on NixOS setup #4594
  3. Override the package as follows to make it work:
    nixpkgs = {
      overlays = [ inputs.hermes-agent.overlays.default ];
      config.permittedInsecurePackages = [ "olm-3.2.16" ];
    };
    
    services.hermes-agent = {
      enable = true;
      package = pkgs.hermes-agent.override {
        dependency-groups = [ "matrix" ];
      };
    };

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: x86_64-linux, NixOS with nixpkgs-unstable

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

@yzx9 yzx9 force-pushed the feature/nix-overlay branch from 136ceb5 to 8d3c588 Compare April 10, 2026 14:51
@yzx9 yzx9 marked this pull request as ready for review April 10, 2026 14:52
@alt-glitch

Copy link
Copy Markdown
Collaborator

@BugBot review

@alt-glitch

Copy link
Copy Markdown
Collaborator

fixed in #7461

@alt-glitch alt-glitch closed this Apr 11, 2026
@yzx9

yzx9 commented Apr 11, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for your quick response and the fix! Even with #7461 in place, I believe this PR is still valuable because it makes the Nix packages overridable. I’d still be happy to see this PR move forward.

@yzx9 yzx9 changed the title fix(nix): add overlay and make package overridable feat(nix): add overlay and make package overridable Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Setup]: Matrix does not work on NixOS setup

2 participants