feat(ollama): better Ollama configuration
This commit is contained in:
@@ -16,11 +16,17 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.services.ollama = mkIf cfg.enable {
|
config = {
|
||||||
inherit (cfg) enable;
|
services.ollama = mkIf cfg.enable {
|
||||||
acceleration = cfg.gpu;
|
inherit (cfg) enable;
|
||||||
environmentVariables = {
|
acceleration = cfg.gpu;
|
||||||
OLLAMA_CONTEXT_LENGTH = "8192";
|
host = "0.0.0.0";
|
||||||
|
environmentVariables = {
|
||||||
|
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||||
|
OLLAMA_MAX_LOADED_MODELS = "1";
|
||||||
|
OLLAMA_KEEP_ALIVE = "10m";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
home.sessionVariables.OLLAMA_API_BASE = "http://${config.services.ollama.host}:11434/";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
||||||
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
||||||
LSP_USE_PLISTS = "true";
|
LSP_USE_PLISTS = "true";
|
||||||
|
OPENAI_API_URL = "http://localhost:1234/";
|
||||||
};
|
};
|
||||||
desktop.waybar.style = ./config/waybar/style.css;
|
desktop.waybar.style = ./config/waybar/style.css;
|
||||||
dev = {
|
dev = {
|
||||||
|
|||||||
Reference in New Issue
Block a user