Skip to content

Commit d5e47eb

Browse files
committed
home/services/ollama: fix hardware check on darwin
1 parent e40feef commit d5e47eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/home/services/ollama/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let
1111
cfg = config.${namespace}.services.ollama;
1212

1313
amdCfg = osConfig.khanelinix.hardware.gpu.amd;
14+
hasHardwareConfig = lib.hasAttr "hardware" osConfig.khanelinix;
1415
in
1516
{
1617
options.${namespace}.services.ollama = {
@@ -26,7 +27,7 @@ in
2627
lib.optionalAttrs cfg.enableDebug {
2728
OLLAMA_DEBUG = "1";
2829
}
29-
// lib.optionalAttrs (amdCfg.enable && amdCfg.enableRocmSupport) {
30+
// lib.optionalAttrs (hasHardwareConfig && amdCfg.enable && amdCfg.enableRocmSupport) {
3031
HCC_AMDGPU_TARGET = "gfx1100";
3132
HSA_OVERRIDE_GFX_VERSION = "11.0.0";
3233
AMD_LOG_LEVEL = lib.mkIf cfg.enableDebug "3";

0 commit comments

Comments
 (0)