feat: make it go boom

This commit is contained in:
s-prechtl 2025-11-04 22:32:06 +01:00
parent 7a32c71591
commit a75e2b3624
3 changed files with 52 additions and 0 deletions

View file

@ -35,6 +35,7 @@ in {
./matrix.nix ./matrix.nix
./mail.nix ./mail.nix
./llm.nix ./llm.nix
./nvidia.nix
inputs.mms.module inputs.mms.module
]; ];

View file

@ -5,4 +5,11 @@
openFirewall = true; openFirewall = true;
host = "0.0.0.0"; host = "0.0.0.0";
}; };
services.ollama = {
enable = true;
acceleration = "cuda";
loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b" "gpt-oss:20b" ];
};
} }

View file

@ -0,0 +1,44 @@
{config, lib, ...}:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
];
# Enable OpenGL
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}