- 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
96 lines
2.8 KiB
Nix
96 lines
2.8 KiB
Nix
{ 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;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|