add config from gitlab
This commit is contained in:
commit
e02f7f00f9
842 changed files with 297362 additions and 0 deletions
37
hosts/nixos-home/config/drivers_video.nix
Normal file
37
hosts/nixos-home/config/drivers_video.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# driver proprietaire
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true; # nécessaire pour Steam / jeux 32-bit
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # VAAPI pour l'iGPU Intel (Coffee Lake)
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # requis pour Wayland/Hyprland
|
||||
# dGPU endormi en général, offload sinon
|
||||
powerManagement.enable = true;
|
||||
# powerManagement.finegrained = true; # nécessite offload (ci-dessous)
|
||||
# RTX 2060 = Turing. Le driver "open" fonctionne pour Turing+, mais le
|
||||
# propriétaire reste plus mature sur cette génération. Garde `open = false`.
|
||||
open = false;
|
||||
nvidiaSettings = true; # fournit `nvidia-settings`
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
#offload = {
|
||||
# enable = true; # dGPU à la demande (meilleure autonomie)
|
||||
# enableOffloadCmd = true; # fournit la commande `nvidia-offload`
|
||||
#};
|
||||
# nix shell nixpkgs#pciutils -c lspci -D -d ::03xx
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue