From bdaa765dbbf2239b8f0093000e410243403d9e84 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Wed, 19 Feb 2025 23:28:42 +0100 Subject: [PATCH] wenche: start adding NVIDIA support --- flake.nix | 5 +++++ hosts/wenche/configuration.nix | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index fcf04a6..2c549e4 100644 --- a/flake.nix +++ b/flake.nix @@ -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 [ ]; diff --git a/hosts/wenche/configuration.nix b/hosts/wenche/configuration.nix index 2791a19..79eade7 100644 --- a/hosts/wenche/configuration.nix +++ b/hosts/wenche/configuration.nix @@ -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; [ ];