Skip to content

Commit 9b1ae7c

Browse files
committed
fix hermes params
1 parent c076e15 commit 9b1ae7c

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

flake.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@
8787
};
8888
# agent-browser uses this instead of downloading its own chromium.
8989
environment.AGENT_BROWSER_EXECUTABLE_PATH = "/bin/chromium";
90-
ports = [
91-
9999
92-
8644
93-
];
90+
ports = [ 8644 ];
9491
# exe.dev LLM integration (llm.int.exe.xyz, attached auto:all).
9592
settings =
9693
let

modules/exedev/services/hermes.nix

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,21 @@ in
4545
default = "hermes";
4646
description = "Account to run Hermes as; declared by this module.";
4747
};
48-
ports = mkOption {
49-
type = types.listOf types.port;
50-
default = [ 9999 ];
51-
description = "Public ports to expose; the first is used for the dashboard proxy.";
48+
publicPort = mkOption {
49+
type = types.port;
50+
default = 9999;
51+
description = "Public port the dashboard proxy binds.";
5252
};
5353
internalPort = mkOption {
54-
type = types.listOf types.port;
54+
type = types.port;
5555
default = 9119;
5656
description = "Loopback port hermes itself binds.";
5757
};
58+
ports = mkOption {
59+
type = types.listOf types.port;
60+
default = [ ];
61+
description = "Additional public ports to expose.";
62+
};
5863
settings = mkOption {
5964
type = settingsFormat.type;
6065
default = { };
@@ -117,7 +122,7 @@ in
117122
exec /command/s6-setuidgid ${cfg.user} \
118123
env HOME=${user.home} XDG_DATA_HOME=/run/caddy XDG_CONFIG_HOME=/run/caddy \
119124
${pkgs.caddy}/bin/caddy reverse-proxy \
120-
--from http://:${toString (builtins.head cfg.ports)} \
125+
--from http://:${toString cfg.publicPort} \
121126
--to 127.0.0.1:${toString cfg.internalPort} \
122127
--change-host-header \
123128
--header-up "Origin: http://127.0.0.1:${toString cfg.internalPort}"
@@ -136,7 +141,7 @@ in
136141
};
137142

138143
image.packages = [ cfg.package ];
139-
image.exposedPorts.tcp = cfg.ports;
144+
image.exposedPorts.tcp = [ cfg.publicPort ] ++ cfg.ports;
140145
image.labels."exe.dev/install-shelley" = "true";
141146
};
142147
}

0 commit comments

Comments
 (0)