update
This commit is contained in:
parent
a18e244ba5
commit
05a9d96d4e
26 changed files with 861 additions and 182 deletions
29
server/ollama.nix
Normal file
29
server/ollama.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.server.ollama.enable = lib.mkEnableOption "Enable Ollama server /w GPU acceleration";
|
||||
options.server.ollama.options = lib.mkOption {
|
||||
description = "additional options to pass to ollama";
|
||||
default = { };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.server.ollama.enable {
|
||||
services.ollama = lib.attrsets.recursiveUpdate {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
|
||||
# acceleration = "rocm";
|
||||
# rocmOverrideGfx = "11.0.0";
|
||||
} config.server.ollama.options;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 11434 ];
|
||||
|
||||
environment.persistence."/persist/cache".directories = [
|
||||
{
|
||||
directory = "/var/lib/private/ollama";
|
||||
user = "nouser";
|
||||
group = "nogroup";
|
||||
mode = "u=rwx,g=,o=";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue