diff options
author | Alan Pearce | 2024-05-22 13:21:15 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-22 13:21:15 +0200 |
commit | 027db4372e82e445c531c958c2da0f9cf6ae1e03 (patch) | |
tree | 20176def9b78203a785cd6d768a52e2231999400 | |
parent | 4b4ef1464c241c398e4e469d862f0848f75d5894 (diff) | |
download | searchix-027db4372e82e445c531c958c2da0f9cf6ae1e03.tar.lz searchix-027db4372e82e445c531c958c2da0f9cf6ae1e03.tar.zst searchix-027db4372e82e445c531c958c2da0f9cf6ae1e03.zip |
fix(nix): generate default baseURL from listen address and port
-rw-r--r-- | nix/modules/default.nix | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nix/modules/default.nix b/nix/modules/default.nix index 8c8499a..509a372 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -106,11 +106,15 @@ in 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; |