From cce1e33c23dbc95068bc6721a419345cc1d95998 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Thu, 6 Feb 2025 14:13:22 +0100 Subject: [PATCH] Ollama and update --- nixos/flake.lock | 6 +++--- nixos/modules/ollama.nix | 16 ++++++++++++++++ nixos/users.nix | 4 ---- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 nixos/modules/ollama.nix diff --git a/nixos/flake.lock b/nixos/flake.lock index e38ab50..6c155df 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -39,11 +39,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1737404254, - "narHash": "sha256-L8Lxp/WVdy9gKO2cXptphdP8cMsnGvZF5Noj8N3jLzI=", + "lastModified": 1738804720, + "narHash": "sha256-3bAR5ALk5AoFt4BlsQRdjSV6VVH6lbgtYdElb0A+qDc=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "f8ef9c97ac2f49d5c04dbf3b3d80a0490c05fefb", + "rev": "7868f1c54b7f8e09be194aaa0934791596df1ea1", "type": "github" }, "original": { diff --git a/nixos/modules/ollama.nix b/nixos/modules/ollama.nix new file mode 100644 index 0000000..630b521 --- /dev/null +++ b/nixos/modules/ollama.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + # Add Ollama and OpenWebUI + services.ollama = { + enable = true; + loadModels = [ deepseek-r1:32b ]; + acceleration = "rocm"; + rocmOverrideGfx = "11.0.0"; + environmentVariables = { + HSA_OVERRIDE_GFX_VERSION = "11.0.0"; + }; + }; + + services.open-webui.enable = true; +} diff --git a/nixos/users.nix b/nixos/users.nix index 7142b56..f1866e8 100644 --- a/nixos/users.nix +++ b/nixos/users.nix @@ -71,9 +71,5 @@ virtualisation.docker = { enable = true; enableOnBoot = false; - rootless = { - enable = true; - setSocketVariable = true; - }; }; }