initial commit here we are
This commit is contained in:
commit
82916ad718
59 changed files with 2155 additions and 0 deletions
30
appserver/ollama.nix
Normal file
30
appserver/ollama.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
ollama
|
||||
];
|
||||
systemd.services = {
|
||||
ollama = {
|
||||
description = "Server for local large language models";
|
||||
after = ["network-online.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
HOME = "%S/ollama";
|
||||
OLLAMA_HOST = "0.0.0.0";
|
||||
OLLAMA_MODELS = "%S/ollama/models";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "ollama";
|
||||
Group = "ollama";
|
||||
Restart = "always";
|
||||
RestartSec = "3";
|
||||
WorkingDirectory = "/var/lib/ollama";
|
||||
StateDirectory = [ "ollama" ];
|
||||
DynamicUser = true;
|
||||
ExecStart = "${pkgs.ollama}/bin/ollama serve";
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 11434 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue