refactor!: switch to dendritic pattern

BREAKING CHANGE: complete reorganization of the repository
This commit is contained in:
2026-09-30 18:36:06 +02:00
parent 12684b4e9c
commit 5f4a7a4a42
323 changed files with 7117 additions and 7380 deletions
+34
View File
@@ -0,0 +1,34 @@
{
flake.modules.homeManager.ollama = {
config,
lib,
...
}:
with lib; let
cfg = config.home.dev.ai.ollama;
in {
options.home.dev.ai.ollama = {
enable = mkEnableOption "Enables Ollama";
gpu = mkOption {
type = types.nullOr (types.enum [false "rocm" "cuda"]);
example = "rocm";
default = null;
description = "Which type of GPU should be used for hardware acceleration";
};
};
config = {
services.ollama = mkIf cfg.enable {
inherit (cfg) enable;
acceleration = cfg.gpu;
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/";
};
};
}