nixos/services/ollama.nix

32 lines
1.3 KiB
Nix
Raw Normal View History

2026-05-12 13:34:07 +01:00
{ config, pkgs, lib, ... }:
{
2026-05-12 15:31:26 +01:00
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
2026-05-12 13:34:07 +01:00
services.ollama.enable = true;
# Quadro M2000 (Maxwell/GM206) uses legacy_535 driver which caps CUDA
# at 12.2. nixpkgs has removed all CUDA versions ≤12.5 as unmaintained,
# and 12.6+ requires driver ≥560. CPU inference is the only option.
2026-05-12 13:34:07 +01:00
2026-05-12 13:54:08 +01:00
services.open-webui.enable = true;
services.open-webui.port = 8888;
2026-05-12 21:27:12 +01:00
services.open-webui.environment.WEBUI_AUTH = "False"; # auth handled by Authelia upstream
2026-05-12 13:54:08 +01:00
2026-05-12 15:17:01 +01:00
nixpkgs.overlays = [
(final: prev: {
2026-05-12 15:31:26 +01:00
# We need to reach into the python package set
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(python-final: python-prev: {
langchain = python-prev.langchain.overridePythonAttrs (oldAttrs: {
2026-05-12 19:26:49 +01:00
doCheck = false;
2026-05-12 15:31:26 +01:00
});
})
];
2026-05-12 19:26:49 +01:00
# valkey 8.1.x has a flaky replication integration test that
# fails non-deterministically; skip checks to unblock open-webui.
valkey = prev.valkey.overrideAttrs (oldAttrs: {
doCheck = false;
});
2026-05-12 15:17:01 +01:00
})
];
2026-05-12 13:34:38 +01:00
};
2026-05-12 13:34:07 +01:00
}