From a91a056c28a5dd93206f24dc6ceef805c8e56435 Mon Sep 17 00:00:00 2001 From: jasmine Date: Fri, 26 Jul 2024 09:01:05 +0800 Subject: [PATCH] Refactor ollama service --- nixos/fuchsia/configuration.nix | 6 ------ nixos/fuchsia/services/default.nix | 1 + nixos/fuchsia/services/ollama.nix | 9 +++++++++ 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 nixos/fuchsia/services/ollama.nix diff --git a/nixos/fuchsia/configuration.nix b/nixos/fuchsia/configuration.nix index 9f9b7a1..c278e1d 100644 --- a/nixos/fuchsia/configuration.nix +++ b/nixos/fuchsia/configuration.nix @@ -69,12 +69,6 @@ mouse = { accelProfile = "flat"; }; }; - # Get up and running with large language models locally. - ollama = { - enable = true; - acceleration = "rocm"; - }; - # Enable a few other services. ratbagd.enable = true; pcscd.enable = true; diff --git a/nixos/fuchsia/services/default.nix b/nixos/fuchsia/services/default.nix index 5fc2fc0..9706bf5 100644 --- a/nixos/fuchsia/services/default.nix +++ b/nixos/fuchsia/services/default.nix @@ -4,6 +4,7 @@ imports = [ ./amdgpu-clocks.nix ./flatpak.nix + ./ollama.nix ./xserver.nix ]; } diff --git a/nixos/fuchsia/services/ollama.nix b/nixos/fuchsia/services/ollama.nix new file mode 100644 index 0000000..733432d --- /dev/null +++ b/nixos/fuchsia/services/ollama.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + # Get up and running with large language models locally. + services.ollama = { + enable = true; + acceleration = "rocm"; + }; +}