nixos/services/ollama.nix

25 lines
858 B
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;
2026-05-12 13:44:55 +01:00
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 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: {
# This disables the checkPhase (running tests) for langchain
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
}