wenche: start adding NVIDIA support

This commit is contained in:
Felix Albrigtsen 2025-02-19 23:28:42 +01:00
parent c0e551eb8b
commit bdaa765dbb
2 changed files with 14 additions and 1 deletions

View File

@ -71,6 +71,11 @@
pkgs = import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
[
"nvidia-x11"
"nvidia-settings"
];
overlays = [
# Global overlays go here
] ++ config.overlays or [ ];

View File

@ -1,4 +1,4 @@
{ config, fp, pkgs, values, ... }:
{ config, fp, pkgs, values, lib, ... }:
{
imports = [
# Include the results of the hardware scan.
@ -23,6 +23,14 @@
address = with values.hosts.wenche; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = true;
package = config.boot.kernelPackages.nvidiaPackages.production;
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];