diff options
| -rw-r--r-- | configs/hermes.nix | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/configs/hermes.nix b/configs/hermes.nix index 7255fc3..ab04b15 100644 --- a/configs/hermes.nix +++ b/configs/hermes.nix @@ -38,11 +38,21 @@ let # Fetched with the host's pkgs (see default.nix), as imports need it. # Bump rev and hash together. - src = hostPkgs.fetchFromGitHub { - owner = "NousResearch"; - repo = "hermes-agent"; - rev = "9f47677483d1b4de4d1a88d37b3b7ca18b18b215"; - hash = "sha256-4fRnt5Dh7bbuNR6XODpuhoXP/XOrZP0Fc5XqYuvj+/Y="; + src = hostPkgs.applyPatches { + name = "hermes-agent-source"; + src = hostPkgs.fetchFromGitHub { + owner = "NousResearch"; + repo = "hermes-agent"; + rev = "9f47677483d1b4de4d1a88d37b3b7ca18b18b215"; + hash = "sha256-4fRnt5Dh7bbuNR6XODpuhoXP/XOrZP0Fc5XqYuvj+/Y="; + }; + # The gateway's log lines on stderr get a timestamp of their own, which + # journald adds anyway: leave it out when stderr is the journal. + postPatch = '' + substituteInPlace gateway/run.py --replace-fail \ + 'RedactingFormatter("%(asctime)s %(levelname)s %(name)s: %(message)s")' \ + 'RedactingFormatter(("" if os.environ.get("JOURNAL_STREAM") else "%(asctime)s ") + "%(levelname)s %(name)s: %(message)s")' + ''; }; # hermes-agent's flake without flakes, like flake-compat, but with this |
