nix/hosts/netty/hermes-gateway.nix
Harivansh Rathi 0aab0a4d61
Some checks failed
quality / changes (push) Successful in 2s
quality / Flake Check (push) Failing after 1s
quality / Nix Format Check (push) Failing after 1s
quality / Deploy netty (push) Has been skipped
ci: drop darwin shims, rebuild locally on netty runner
- remove macOS-era `sudo mkdir /Users/rathi/...` shim steps from flake-check
  and nix-format (Linux runner, paths don't exist, gitea-runner has no sudo)
- deploy-netty now runs `sudo nixos-rebuild switch --flake .#netty` directly
  on the runner (it *is* netty), no SSH, no `just switch-netty`
- grant gitea-runner NOPASSWD sudo for nixos-rebuild only
- apply current nixfmt to home/scripts.nix, hermes-gateway.nix, devshells.nix

Made-with: Cursor
2026-04-18 22:33:25 -04:00

77 lines
1.6 KiB
Nix

{
inputs,
pkgs,
username,
...
}:
let
homeDir = "/home/${username}";
stateDir = "${homeDir}/.hermes";
in
{
# The hermes-agent NixOS module orders its activation script after
# "setupSecrets" (sops-nix / agenix). We don't use either, so
# provide a no-op to satisfy the dependency.
system.activationScripts.setupSecrets = "";
services.hermes-agent = {
enable = true;
package = inputs.hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.default;
user = username;
group = "users";
createUser = false;
stateDir = stateDir;
workingDirectory = "${stateDir}/workspace";
addToSystemPackages = false;
environmentFiles = [ "${stateDir}/.env" ];
environment = {
HERMES_MANAGED = "true";
};
documents = {
"SOUL.md" = ../../config/hermes/SOUL.md;
"TOOLS.md" = ../../config/hermes/TOOLS.md;
"HEARTBEAT.md" = ../../config/hermes/HEARTBEAT.md;
};
settings = {
model = {
provider = "openai-codex";
model = "gpt-5.4";
};
agent = {
max_turns = 100;
verbose = false;
};
terminal = {
backend = "local";
};
compression = {
enabled = true;
};
memory = {
memory_enabled = true;
user_profile_enabled = true;
};
toolsets = [ "coding" ];
channels = {
telegram = {
bot_token = "\${TELEGRAM_BOT_TOKEN}";
dm_policy = "pairing";
};
};
};
mcpServers = { };
extraPackages = with pkgs; [
nodejs_22
git
docker
];
restart = "always";
restartSec = 5;
};
}