From 6df5c71ea136984a3b564186d8b8b28cb9b41bb5 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 20 Jan 2025 10:26:01 +0000 Subject: [PATCH] ADD: nvidia drivers --- hosts/merlin/default.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/hosts/merlin/default.nix b/hosts/merlin/default.nix index 05836bb..b7bf237 100644 --- a/hosts/merlin/default.nix +++ b/hosts/merlin/default.nix @@ -2,6 +2,7 @@ inputs, configVars, lib, + config, ... }: let # 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.zfs.forceImportRoot = false; networking.hostId = "18aec5d7";