mirror of
https://github.com/Alexandre1a/NixOSDots.git
synced 2026-03-10 00:09:46 +01:00
Fixed ollama
This commit is contained in:
parent
c0545f59a8
commit
92ee670ee3
@ -4,6 +4,6 @@
|
|||||||
# Enpty file for future imports
|
# Enpty file for future imports
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/macos/ollama.nix
|
../../modules/macos/ollama.nix
|
||||||
(import ../../modules/common/ai.nix { inherit pkgs; })
|
../../modules/common/ai.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,7 @@
|
|||||||
playerctl
|
playerctl
|
||||||
|
|
||||||
# Nvidia packages
|
# Nvidia packages
|
||||||
|
nvtopPackages.nvidia
|
||||||
# Video accel
|
# Video accel
|
||||||
libva
|
libva
|
||||||
libva-utils
|
libva-utils
|
||||||
|
|||||||
@ -12,6 +12,6 @@
|
|||||||
../../modules/nixos/gamming/steam.nix # For Steam/Proton/Lutris/MangoHUD/Heroic/Bottles
|
../../modules/nixos/gamming/steam.nix # For Steam/Proton/Lutris/MangoHUD/Heroic/Bottles
|
||||||
../../modules/common/spotify.nix # Spotify/Spicetify
|
../../modules/common/spotify.nix # Spotify/Spicetify
|
||||||
../../modules/common/ssh.nix
|
../../modules/common/ssh.nix
|
||||||
(import ../../modules/common/ai.nix { inherit pkgs; })
|
../../modules/common/ai.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,18 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Détection simple du GPU pour choisir le package Ollama
|
|
||||||
|
hasNvidiaGpu = config.hardware.nvidia.package or null != null;
|
||||||
|
|
||||||
gpu =
|
gpu =
|
||||||
if builtins.hasAttr "nvidia" pkgs then
|
if hasNvidiaGpu then
|
||||||
pkgs.ollama-cuda
|
pkgs.ollama-cuda
|
||||||
else if builtins.hasAttr "vulkan" pkgs then
|
else if builtins.hasAttr "vulkan" pkgs then
|
||||||
pkgs.ollama-vulkan
|
pkgs.ollama-vulkan
|
||||||
else if builtins.hasAttr "rocm" pkgs then
|
else if builtins.hasAttr "amd" pkgs then
|
||||||
pkgs.ollama-rocm
|
pkgs.ollama-rocm
|
||||||
|
else if pkgs.stdenv.isDarwin then
|
||||||
|
pkgs.ollama # Ollama uses Metal by default
|
||||||
else
|
else
|
||||||
pkgs.ollama; # CPU fallback
|
pkgs.ollama; # CPU fallback
|
||||||
in
|
in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user