nixos/services/ollama.nix

30 lines
1.1 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;
services.ollama.acceleration = "cuda";
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
}