ADD: nvidia drivers

This commit is contained in:
Sam 2025-01-20 10:26:01 +00:00
parent 92a5c93e6a
commit 6df5c71ea1
1 changed files with 33 additions and 0 deletions

View File

@ -2,6 +2,7 @@
inputs, inputs,
configVars, configVars,
lib, lib,
config,
... ...
}: let }: let
# Disko setup # Disko setup
@ -88,6 +89,38 @@ in {
]; ];
}; };
# Enable OpenGL
hardware.graphics = {
enable = true;
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
];
# Load nvidia driver
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
open = false;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# system.services.nixosAutoUpgrade = {
# enable = true;
# persistent = true;
# reboot = false;
# pushUpdates = false;
# configDir = "/etc/nixos";
# onCalendar = "*-*-* 07:00:00";
# user = "media";
# };
#
boot.supportedFilesystems = ["zfs"]; boot.supportedFilesystems = ["zfs"];
boot.zfs.forceImportRoot = false; boot.zfs.forceImportRoot = false;
networking.hostId = "18aec5d7"; networking.hostId = "18aec5d7";