all repos — searchix @ 027db4372e82e445c531c958c2da0f9cf6ae1e03

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix(nix): generate default baseURL from listen address and port

Alan Pearce
commit

027db4372e82e445c531c958c2da0f9cf6ae1e03

parent

4b4ef1464c241c398e4e469d862f0848f75d5894

1 file changed, 9 insertions(+), 5 deletions(-)

jump to
M nix/modules/default.nixnix/modules/default.nix
@@ -106,11 +106,15 @@ description = "Listen on a specific IP address.";
default = "localhost"; }; - baseURL = mkOption { - type = types.str; - description = "The base URL that searchix will be served on."; - default = "http://localhost:3000"; - }; + baseURL = + let + inherit (config.services.searchix.settings) web; + in + mkOption { + type = types.str; + description = "The base URL that searchix will be served on."; + default = "http://${web.listenAddress}:${web.port}"; + }; environment = mkOption { type = types.str;