We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b397b2 commit 8d956b1Copy full SHA for 8d956b1
nixos/modules/services/misc/ollama.nix
@@ -9,6 +9,13 @@ in {
9
enable = lib.mkEnableOption (
10
lib.mdDoc "Server for local large language models"
11
);
12
+ listenAddress = lib.mkOption {
13
+ type = lib.types.str;
14
+ default = "127.0.0.1:11434";
15
+ description = lib.mdDoc ''
16
+ Specifies the bind address on which the ollama server HTTP interface listens.
17
+ '';
18
+ };
19
package = lib.mkPackageOption pkgs "ollama" { };
20
};
21
@@ -23,6 +30,7 @@ in {
23
30
environment = {
24
31
HOME = "%S/ollama";
25
32
OLLAMA_MODELS = "%S/ollama/models";
33
+ OLLAMA_HOST = cfg.listenAddress;
26
34
27
35
serviceConfig = {
28
36
ExecStart = "${lib.getExe cfg.package} serve";
0 commit comments