Enable nvidia drivers

This commit is contained in:
Manuel Thalmann 2024-05-08 00:33:39 +02:00
parent 223dc96305
commit b54f6cf678
2 changed files with 18 additions and 1 deletions

View file

@ -33,6 +33,7 @@
LANGUAGE = defaultLocale;
LC_MESSAGE = defaultLocale;
};
nvidia = true;
users = {
manuel = {
fullName = "Manuel Thalmann";

View file

@ -1,4 +1,4 @@
{ lib, machine, pkgs, ... }: {
{ config, lib, machine, pkgs, ... }: {
imports = [
./modules/custom-build-vm.nix
./modules/custom-sops-nix.nix
@ -86,6 +86,22 @@
i18n.extraLocaleSettings = machine.config.localeSettings;
# Graphics
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = lib.optional machine.config.nvidia "nvidia";
hardware.nvidia = lib.optionalAttrs machine.config.nvidia {
modesetting.enable = true;
powerManagement.finegrained = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# Enable KDE Plasma
services.displayManager.sddm = {
enable = true;