This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-08-26 21:25:51 +02:00
parent 4b42af4523
commit ce84d681e0
15 changed files with 504 additions and 137 deletions

View File

@@ -1,12 +1,22 @@
{ pkgs, pkgs-unstable, lib, host, nvidia, ... }:
let p = pkgs-unstable; in
{
environment.systemPackages = with p; [
ollama
];
{ pkgs, pkgs-unstable, pkgs-latest, lib, host, nvidia, ... }:
let
p = pkgs-latest.ollama;
# p = pkgs-unstable.ollama.overrideAttrs (oldAttrs: rec {
# inherit (oldAttrs) pname;
# version = "0.3.0";
# src = pkgs.fetchFromGitHub {
# owner = "ollama";
# repo = "ollama";
# rev = "v${version}";
# hash = "sha256-69CpRAggx6a1NJq+CA9QliXuUbDgC1ERRuA3y17KVAM=";
# fetchSubmodules = true;
# };
# });
in {
environment.systemPackages = [ p ];
services.ollama = {
package = p.ollama;
package = p;
enable = true;
acceleration = lib.mkIf nvidia.enable "cuda";
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434";