1
1
Fork 0

ollama: move rocm option to program

This commit is contained in:
Myned 2025-03-17 22:31:19 -05:00
parent e694b1ab5f
commit 6ea1430eee
Signed by: Myned
GPG key ID: C7224454F7881A34
4 changed files with 6 additions and 9 deletions
machines
options/custom
services
settings

View file

@ -29,6 +29,7 @@
hardware = {
gpu = "amd";
rocm = "10.3.0"; # 10.3.1
};
storage.mnt = [

View file

@ -28,10 +28,6 @@
services = {
fw-fanctrl.enable = true;
# https://github.com/ollama/ollama/blob/main/docs/gpu.md#overrides
#?? nix run nixpkgs#rocmPackages.rocminfo | grep gfx
ollama.rocmOverrideGfx = "10.3.0"; # 10.3.1
};
settings = {

View file

@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
@ -17,11 +16,11 @@ in {
services.ollama = {
enable = true;
openFirewall = true;
package = pkgs.ollama-rocm;
loadModels = [
"deepseek-r1" # https://github.com/deepseek-ai/DeepSeek-R1
];
# https://wiki.nixos.org/wiki/Ollama#AMD_GPU_with_open_source_driver
# https://github.com/ollama/ollama/blob/main/docs/gpu.md#overrides
#?? nix run nixpkgs#rocmPackages.rocminfo | grep gfx
rocmOverrideGfx = with config.custom.settings.hardware; mkIf (isString rocm) rocm;
};
};
}

View file

@ -9,6 +9,7 @@ in {
options.custom.settings.hardware = {
enable = mkOption {default = false;};
gpu = mkOption {default = null;};
rocm = mkOption {default = null;};
};
config = mkIf cfg.enable {