Initial setup: Nix flake wrapping Hermes Agent as Speckl SME
- flake.nix wrapping github:NousResearch/hermes-agent - NixOS module (nix/nixosModules.nix) with Speckl-preset config: - Model: anthropic/claude-opus-4.6 - Memory + skill generation + user modeling enabled - Container mode for self-modification - Deep-merged with user overrides - documents/SOUL.md — Speckl domain expert persona - documents/AGENTS.md — workspace rules - documents/USER.md — user template - README.md with usage instructions
This commit is contained in:
commit
e99b08c0da
9 changed files with 360 additions and 0 deletions
96
nix/nixosModules.nix
Normal file
96
nix/nixosModules.nix
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.speckl = { config, lib, pkgs, ... }:
|
||||
let
|
||||
hermes = inputs.hermes-agent.nixosModules.default;
|
||||
in {
|
||||
imports = [ hermes ];
|
||||
|
||||
options.services.hermes-speckl = with lib; {
|
||||
enable = mkEnableOption "Speckl SME agent (Hermes-based)";
|
||||
|
||||
settings = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Hermes config overrides. Deep-merged with Speckl defaults.";
|
||||
};
|
||||
|
||||
environmentFiles = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default = [ ];
|
||||
description = "Paths to env files with API keys.";
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Non-secret environment variables.";
|
||||
};
|
||||
|
||||
addToSystemPackages = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Add hermes CLI to system PATH.";
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
description = "Extra packages for the agent.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.hermes-speckl.enable {
|
||||
# Map hermes-speckl service config to upstream hermes-agent service
|
||||
services.hermes-agent = {
|
||||
enable = true;
|
||||
addToSystemPackages = config.services.hermes-speckl.addToSystemPackages;
|
||||
environmentFiles = config.services.hermes-speckl.environmentFiles;
|
||||
environment = config.services.hermes-speckl.environment;
|
||||
container.enable = true;
|
||||
extraPackages = config.services.hermes-speckl.extraPackages;
|
||||
|
||||
# Speckl-preset default settings (deep-merged with user overrides)
|
||||
settings = lib.recursiveUpdate {
|
||||
model = {
|
||||
default = "anthropic/claude-opus-4.6";
|
||||
base_url = "https://openrouter.ai/api/v1";
|
||||
};
|
||||
|
||||
terminal = {
|
||||
backend = "local";
|
||||
timeout = 180;
|
||||
};
|
||||
|
||||
agent = {
|
||||
max_turns = 60;
|
||||
reasoning_effort = "medium";
|
||||
};
|
||||
|
||||
memory = {
|
||||
memory_enabled = true;
|
||||
skill_generation = true;
|
||||
user_profile_enabled = true;
|
||||
memory_char_limit = 4000;
|
||||
nudge_interval = 10;
|
||||
};
|
||||
|
||||
compression = {
|
||||
enabled = true;
|
||||
threshold = 0.85;
|
||||
summary_model = "google/gemini-3-flash-preview";
|
||||
};
|
||||
|
||||
toolsets = [ "all" ];
|
||||
} config.services.hermes-speckl.settings;
|
||||
|
||||
# Speckl workspace documents
|
||||
documents = {
|
||||
"SOUL.md" = builtins.readFile ./documents/SOUL.md;
|
||||
"AGENTS.md" = builtins.readFile ./documents/AGENTS.md;
|
||||
"USER.md" = builtins.readFile ./documents/USER.md;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
nix/packages.nix
Normal file
26
nix/packages.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
default = inputs.hermes-agent.packages.${system}.default;
|
||||
|
||||
speckl-config = pkgs.writeTextDir "speckl-config.yaml" ''
|
||||
# Speckl SME — generated config
|
||||
# Override via services.hermes-speckl.settings
|
||||
model:
|
||||
default: "anthropic/claude-opus-4.6"
|
||||
memory:
|
||||
memory_enabled: true
|
||||
skill_generation: true
|
||||
user_profile_enabled: true
|
||||
toolsets:
|
||||
- all
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
# Helper: build for the standard platforms
|
||||
forAllSystems = inputs.nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue