first commit

This commit is contained in:
Damian Wessels
2025-09-15 22:39:41 +02:00
commit 1c60d751da
10 changed files with 803 additions and 0 deletions

36
modules/ollama.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, lib, ... }:
{
services.ollama = {
enable = true;
acceleration = "rocm";
};
services.opensnitch.rules = {
rule-500-download-models = {
name = "Allow ollama to fetch models";
enabled = true;
action = "allow";
duration = "always";
operator = {
type = "list";
operand = "list";
list = [
{
type = "simple";
sensitive = false;
operand = "process.path";
data = "${lib.getBin pkgs.ollama-rocm}/bin/.ollama-wrapped";
}
{
type = "regexp";
operand = "dest.host";
sensitive = false;
data = "^(registry.ollama.ai)|(([a-z0-9|-]+\\.)*cloudflarestorage.com)$";
}
];
};
};
};
}