summary refs log tree commit diff
path: root/host/Rory-desktop/ollama.nix
blob: 0670617ff138aabb1f6cbed7855ec62909c93027 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  config,
  pkgs,
  lib,
  ...
}:

{
  #  systemd.tmpfiles.rules = [  "d /data/ollama 0750 ostgres postgres" ];

  #overlays
  #nixpkgs.overlays = [
  #  (final: old: {
  #      rocmPackages = old.rocmPackages // {
  #        rocblas = (old.rocmPackages.rocblas.overrideAttrs (oldAttrs: {
  #          gpuTargets = [ "gfx1102" ];
  #        }));
  #      };
  #    }
  #  )
  #];

  services.ollama = {
    enable = false;
    home = "/data/ollama/home";
    models = "/data/ollama/home/models";
    environmentVariables = {
      OLLAMA_LLM_LIBRARY = "rocm";
    };
    #    writablePaths = [ "/data/ollama/home" ];
    #listenAddress = "0.0.0.0:11434";
    host = "0.0.0.0";
    port = 11434;
    user = "ollama";
    group = "ollama";
    acceleration = "rocm";
  };
}