nixos/modules/system/server/ollama/default.nix
Florian RICHER e493646556
All checks were successful
check / check (push) Successful in 29s
Update OS
2024-06-29 11:05:38 +02:00

21 lines
444 B
Nix

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.system.server.ollama;
nvidiaEnabled = config.modules.system.hardware.nvidia.enable;
in
{
options.modules.system.server.ollama = {
enable = mkEnableOption ''
Enable ollama with my custom configurations
'';
};
config = mkIf cfg.enable {
services.ollama = {
enable = true;
acceleration = if nvidiaEnabled then "cuda" else null;
};
};
}