From ec53a3ad7af25fd08d6087467e02ee8e70d4b203 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 27 Apr 2023 14:36:43 +0200 Subject: [PATCH] eevee nvidia fuckery --- flake.lock | 32 ++++++++++---------- flake.nix | 2 +- nixos/hosts/thalassa/eevee/configuration.nix | 2 +- nixos/hosts/thalassa/eevee/hardware.nix | 21 +++++++++++-- 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index fe330f3..92af707 100644 --- a/flake.lock +++ b/flake.lock @@ -88,11 +88,11 @@ "stable": "stable" }, "locked": { - "lastModified": 1675730932, - "narHash": "sha256-XcmirehPIcZGS7PzkS3WvAYQ9GBlBvCxYToIOIV2PVE=", + "lastModified": 1682202576, + "narHash": "sha256-vcTEEEHKx4PTfY80bUmZMwXRy0cTDJCkULHhqe1HJS8=", "owner": "zhaofengli", "repo": "colmena", - "rev": "e034c15825c439131e4489de5a82cf8e5398fa61", + "rev": "089431737e283ed3e402a7dff578cb442444c431", "type": "github" }, "original": { @@ -484,11 +484,11 @@ ] }, "locked": { - "lastModified": 1682072616, - "narHash": "sha256-sR5RL3LACGuq5oePcAoJ/e1S3vitKQQSNACMYmqIE1E=", + "lastModified": 1682203081, + "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "47d6c3f65234230d37f1cf7d3d6b5575ec80fe0c", + "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", "type": "github" }, "original": { @@ -799,11 +799,11 @@ }, "nixpkgs_22-11": { "locked": { - "lastModified": 1681932375, - "narHash": "sha256-tSXbYmpnKSSWpzOrs27ie8X3I0yqKA6AuCzCYNtwbCU=", + "lastModified": 1682134069, + "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3d302c67ab8647327dba84fbdb443cdbf0e82744", + "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", "type": "github" }, "original": { @@ -831,16 +831,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1681920287, - "narHash": "sha256-+/d6XQQfhhXVfqfLROJoqj3TuG38CAeoT6jO1g9r1k0=", + "lastModified": 1682243997, + "narHash": "sha256-yLsPkvrkRYYtDLndtBbgduG1ErNlbTkNlHzwyIMGaig=", "owner": "nixos", "repo": "nixpkgs", - "rev": "645bc49f34fa8eff95479f0345ff57e55b53437e", + "rev": "f423f57ba63782c3b13af0c3100f7863dc8c1e61", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -946,11 +946,11 @@ }, "nur": { "locked": { - "lastModified": 1682170448, - "narHash": "sha256-vYIeXWCl9hOTUKUA6RhS+XqN31VR+GJbcNxBYpjIQU4=", + "lastModified": 1682222997, + "narHash": "sha256-7PEtbnVsdj+wFiEA14NdwAcxHNlx6z4mJ6MCCWhLPJw=", "owner": "nix-community", "repo": "NUR", - "rev": "fe2bdf88ea839ca934412d8c9a7fad26893e481e", + "rev": "12ce41b211b7a85975703b6c66868fdd8dc1e42a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 99fd58c..10ef2bd 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ # * https://github.com/Infinidoge/nix-minecraft inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/master"; nixpkgs_22-11.url = "github:nixos/nixpkgs/nixos-22.11"; nur.url = "github:nix-community/NUR"; diff --git a/nixos/hosts/thalassa/eevee/configuration.nix b/nixos/hosts/thalassa/eevee/configuration.nix index 355b171..403cc7f 100644 --- a/nixos/hosts/thalassa/eevee/configuration.nix +++ b/nixos/hosts/thalassa/eevee/configuration.nix @@ -20,7 +20,7 @@ }; kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; initrd = { - kernelModules = [ "amdgpu" ]; + kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; systemd.enable = true; verbose = false; }; diff --git a/nixos/hosts/thalassa/eevee/hardware.nix b/nixos/hosts/thalassa/eevee/hardware.nix index d68fcc0..6c441a4 100644 --- a/nixos/hosts/thalassa/eevee/hardware.nix +++ b/nixos/hosts/thalassa/eevee/hardware.nix @@ -5,9 +5,24 @@ services.hardware.bolt.enable = true; - hardware.opengl.enable = true; - hardware.nvidia.modesetting.enable = true; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.beta; + + # Open drivers cause gdm to crash + # open = true; + + # nvidia-drm.modeset=1 + modesetting.enable = true; + }; + + # Hardware acceleration + hardware.opengl = { + enable = true; + + # Vulkan + driSupport = true; + }; services.udev.packages = with pkgs; [ wooting-udev-rules ];