init repos
This commit is contained in:
20
modules/hardware/amd-gpu.nix
Normal file
20
modules/hardware/amd-gpu.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.nvtopPackages.amd
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "amdgpu" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
}
|
||||
17
modules/hardware/ollama.nix
Normal file
17
modules/hardware/ollama.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "rocm";
|
||||
host = "0.0.0.0";
|
||||
port = 11434;
|
||||
user = "ollama";
|
||||
group = "ollama";
|
||||
};
|
||||
|
||||
# Fix ownership on the externally mounted disk at /var/lib/private/ollama
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z /var/lib/private/ollama 0750 ollama ollama -"
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 11434 ];
|
||||
}
|
||||
Reference in New Issue
Block a user