ollama: add server option
This commit is contained in:
parent
396b389cbc
commit
d4d0aa68c4
3 changed files with 27 additions and 11 deletions
|
@ -146,17 +146,6 @@ in {
|
|||
# https://zed.dev/docs/configuring-zed
|
||||
userSettings = {
|
||||
always_treat_brackets_as_autoclosed = true;
|
||||
|
||||
assistant = {
|
||||
default_model = {
|
||||
model = "gemma3:1b";
|
||||
provider = "ollama";
|
||||
};
|
||||
|
||||
default_width = 500;
|
||||
version = "2";
|
||||
};
|
||||
|
||||
auto_install_extensions = false;
|
||||
auto_signature_help = true;
|
||||
base_keymap = "VSCode";
|
||||
|
@ -273,6 +262,22 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Language models
|
||||
# https://zed.dev/docs/assistant/assistant
|
||||
assistant = {
|
||||
default_model = {
|
||||
model = "codegemma:7b";
|
||||
provider = "ollama";
|
||||
};
|
||||
|
||||
default_width = 500;
|
||||
version = "2";
|
||||
};
|
||||
|
||||
language_models = {
|
||||
api_url = "http://${config.custom.services.ollama.server}:11434";
|
||||
};
|
||||
|
||||
# TODO: Add missing syntax in highlights.scm
|
||||
# Theme overrides
|
||||
# https://zed.dev/docs/themes#theme-overrides
|
||||
|
|
|
@ -8,6 +8,13 @@ with lib; let
|
|||
in {
|
||||
options.custom.services.ollama = {
|
||||
enable = mkOption {default = false;};
|
||||
|
||||
server = mkOption {
|
||||
default =
|
||||
if config.custom.full
|
||||
then "localhost"
|
||||
else "mynix";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
{
|
||||
custom = {
|
||||
full = true;
|
||||
|
||||
# FIXME: Use "laptop" profile
|
||||
profile = "desktop"; # Inherit desktop profile
|
||||
|
||||
desktop = "niri";
|
||||
|
||||
services = {
|
||||
#// auto-cpufreq.enable = true;
|
||||
ollama.server = "mynix";
|
||||
|
||||
power-profiles-daemon = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue