summaryrefslogtreecommitdiff
path: root/os/srv/ollama.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/srv/ollama.nix')
-rw-r--r--os/srv/ollama.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/os/srv/ollama.nix b/os/srv/ollama.nix
new file mode 100644
index 0000000..11babd6
--- /dev/null
+++ b/os/srv/ollama.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.sys.srv.ollama;
+in
+{
+ options.sys.srv.ollama.enable = lib.mkEnableOption "Ollama AI service";
+ config = lib.mkIf cfg.enable {
+ fileSystems."/models" = {
+ device = "/home/ollama";
+ fsType = "none";
+ options = [ "bind" ];
+ };
+
+ services.ollama = {
+ enable = true;
+ package = pkgs.ollama-rocm;
+
+ user = "ollama";
+ models = "/models";
+
+ syncModels = true;
+ loadModels = [
+ "deepseek-r1:14b"
+ "qwen3:14b"
+ ];
+ };
+ };
+}