[system]: Nvidia

This commit is contained in:
Sweetbread 2024-05-01 15:39:14 +03:00
parent 999718f06e
commit aea3998da7
6 changed files with 35 additions and 8 deletions

8
flake.lock generated
View File

@ -38,16 +38,16 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1713145326,
"narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
"lastModified": 1724242322,
"narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
"rev": "224042e9a3039291f22f4f2ded12af95a616cca0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager";

View File

@ -9,6 +9,11 @@
monitor = ",preferred,auto,1";
env = [
"LIBVA_DRIVER_NAME,nvidia"
"XDG_SESSION_TYPE,wayland"
"GBM_BACKEND,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"

View File

@ -1,4 +1,4 @@
{
{ config, ...}: {
imports = [
./hardware-configuration.nix
./packages.nix
@ -18,4 +18,27 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Enabling flakes
system.stateVersion = "23.05"; # Don't change it bro
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View File

@ -1,6 +1,6 @@
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
boot.initrd.kernelModules = [ "nvidia" ];
boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ];
}

View File

@ -102,7 +102,6 @@
pamixer
# GPU stuff
#amdvlk
rocm-opencl-icd
glaxnimate