From 284e62409bd937eb8d8a2da40d4d649774dd064c Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Fri, 9 Aug 2024 22:36:27 +0100 Subject: [PATCH] boron: run ollama service --- flake.lock | 6 +++--- hosts/boron.cx.ts.hillion.co.uk/default.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 941b428..5ffd86e 100644 --- a/flake.lock +++ b/flake.lock @@ -155,11 +155,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1722421184, - "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "lastModified": 1722813957, + "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", "type": "github" }, "original": { diff --git a/hosts/boron.cx.ts.hillion.co.uk/default.nix b/hosts/boron.cx.ts.hillion.co.uk/default.nix index 95baa71..af9daba 100644 --- a/hosts/boron.cx.ts.hillion.co.uk/default.nix +++ b/hosts/boron.cx.ts.hillion.co.uk/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, nixpkgs-unstable, ... }: { imports = [ @@ -82,6 +82,15 @@ fileSystems = [ "/data" ]; }; + ## Ollama + services.ollama = { + enable = true; + package = nixpkgs-unstable.legacyPackages.x86_64-linux.ollama; + + models = "/data/ollama/models"; + writablePaths = [ "/data/ollama/models" ]; + }; + ## Networking boot.kernel.sysctl = { "net.ipv4.ip_forward" = true;