make ollama into a module
This commit is contained in:
parent
60ba5895d3
commit
7d219d06e1
3 changed files with 42 additions and 19 deletions
|
|
@ -26,6 +26,7 @@
|
|||
enableSound = true;
|
||||
enableADB = true;
|
||||
# enableCaddy = true;
|
||||
enableOllama = true;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
|
|
@ -96,25 +97,6 @@
|
|||
nixd
|
||||
];
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
loadModels = ["deepseek-r1:7b" "deepseek-r1:14b"];
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
port = 7070;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
environment = {
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
DO_NOT_TRACK = "True";
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
WEBUI_AUTH = "False";
|
||||
ENABLE_LOGIN_FORM = "False";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05"; # great taboo of the nixos world
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
./i18n.nix
|
||||
./jellyfin.nix
|
||||
./nix-settings.nix
|
||||
./ollama.nix
|
||||
./remote-builds.nix
|
||||
./secrets.nix
|
||||
./sound.nix
|
||||
|
|
|
|||
40
modules/ollama.nix
Normal file
40
modules/ollama.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
myModules = {
|
||||
enableOllama = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Ollama services.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.myModules.enableOllama {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
loadModels = ["deepseek-r1:7b" "deepseek-r1:14b"];
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
port = 7070;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
environment = {
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
DO_NOT_TRACK = "True";
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
WEBUI_AUTH = "False";
|
||||
ENABLE_LOGIN_FORM = "False";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue