Enable ollama service for Tone

Enable GPU acceleration for ollama on Vanguard

Remove extra kernel / driver config from Northstar
This commit is contained in:
Evie Litherland-Smith 2024-06-25 10:21:50 +01:00
parent 53681b102a
commit 29e3c29e3a
3 changed files with 8 additions and 22 deletions

View file

@ -1,20 +1 @@
{ {...}: {imports = [./laptop.nix];}
config,
pkgs,
...
}: {
imports = [./laptop.nix];
boot = {
initrd.kernelModules = ["amdgpu"];
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
};
hardware.opengl = {
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [amdvlk rocmPackages.clr.icd];
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
};
}

View file

@ -14,6 +14,7 @@
systemPackages = with pkgs; [openfortivpn]; systemPackages = with pkgs; [openfortivpn];
}; };
services = { services = {
ollama.enable = true;
samba.enable = true; samba.enable = true;
hardware.bolt.enable = true; hardware.bolt.enable = true;
}; };

View file

@ -1,7 +1,6 @@
{config, ...}: { {config, ...}: {
imports = [./desktop.nix]; imports = [./desktop.nix];
boot = { boot = {
initrd.kernelModules = ["amdgpu"];
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
extraModprobeConfig = '' extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
@ -12,9 +11,14 @@
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
amdgpu.initrd.enable = true;
steam-hardware.enable = true; steam-hardware.enable = true;
}; };
services.ollama.enable = true;
services.ollama = {
enable = true;
acceleration = "rocm";
};
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;