From b0a8ce7b9d05680345e724ef1ba478ee47bd1dda Mon Sep 17 00:00:00 2001 From: albert <albert@sysctl.io> Date: Tue, 17 Dec 2024 19:51:54 +0100 Subject: [PATCH] Add ollama config to nixos-framework --- nixos/common/services/ollama.nix | 12 +++++++----- nixos/hosts/nixos-framework/default.nix | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/common/services/ollama.nix b/nixos/common/services/ollama.nix index 94451090..ca73b905 100644 --- a/nixos/common/services/ollama.nix +++ b/nixos/common/services/ollama.nix @@ -1,6 +1,8 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ ollama ]; - networking.firewall.allowedTCPPorts = [ 11434 ]; - - # TODO: Add SystemD services to start / stop ollama serve -} \ No newline at end of file + services.ollama = { + enable = true; + loadModels = [ + "vanilj/Phi-4" + ]; + }; +} diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix index 440d49f1..30cf75ad 100644 --- a/nixos/hosts/nixos-framework/default.nix +++ b/nixos/hosts/nixos-framework/default.nix @@ -12,6 +12,7 @@ ../../common/services/podman.nix ../../common/services/geoclue.nix ../../common/services/syncthing.nix + ../../common/services/ollama.nix ]; hardware.bluetooth.enable = true; # enables support for Bluetooth