diff --git a/flake.nix b/flake.nix index d8c544d..06b0529 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,9 @@ procps tzdata util-linux + curl + git + jq # browser tool: system chromium + the agent-browser CLI. chromium (import ./packages/agent-browser { inherit pkgs; }) @@ -84,6 +87,7 @@ }; # agent-browser uses this instead of downloading its own chromium. environment.AGENT_BROWSER_EXECUTABLE_PATH = "/bin/chromium"; + ports = [ 9999 8644 ]; # exe.dev LLM integration (llm.int.exe.xyz, attached auto:all). settings = let diff --git a/modules/exedev/services/hermes.nix b/modules/exedev/services/hermes.nix index e27c21c..8b9c21a 100644 --- a/modules/exedev/services/hermes.nix +++ b/modules/exedev/services/hermes.nix @@ -45,13 +45,13 @@ in default = "hermes"; description = "Account to run Hermes as; declared by this module."; }; - port = mkOption { - type = types.port; - default = 9999; - description = "Public port caddy serves the dashboard on."; + ports = mkOption { + type = types.listOf types.port; + default = [ 9999 ]; + description = "Public ports to expose; the first is used for the dashboard proxy."; }; internalPort = mkOption { - type = types.port; + type = types.listOf types.port; default = 9119; description = "Loopback port hermes itself binds."; }; @@ -117,7 +117,7 @@ in exec /command/s6-setuidgid ${cfg.user} \ env HOME=${user.home} XDG_DATA_HOME=/run/caddy XDG_CONFIG_HOME=/run/caddy \ ${pkgs.caddy}/bin/caddy reverse-proxy \ - --from http://:${toString cfg.port} \ + --from http://:${toString (builtins.head cfg.ports)} \ --to 127.0.0.1:${toString cfg.internalPort} \ --change-host-header \ --header-up "Origin: http://127.0.0.1:${toString cfg.internalPort}" @@ -136,7 +136,7 @@ in }; image.packages = [ cfg.package ]; - image.exposedPorts.tcp = [ cfg.port ]; + image.exposedPorts.tcp = cfg.ports; image.labels."exe.dev/install-shelley" = "true"; }; }