mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Nvidia
This commit is contained in:
parent
474e1455ee
commit
2778deb4ea
3 changed files with 37 additions and 11 deletions
|
@ -17,14 +17,9 @@ systemConfiguration {
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
imports = [ hardware.nixosModules.common-gpu-nvidia ];
|
];
|
||||||
|
|
||||||
hardware.nvidia.prime = {
|
|
||||||
intelBusId = "PCI:0:2:0";
|
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/root";
|
device = "/dev/disk/by-label/root";
|
||||||
|
|
34
hosts/enka/nvidia.nix
Normal file
34
hosts/enka/nvidia.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
{ hardware, lib, ... }: with lib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
imports = [ hardware.nixosModules.common-gpu-nvidia ];
|
||||||
|
|
||||||
|
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
|
||||||
|
|
||||||
|
boot.kernelModules = [
|
||||||
|
"nvidia"
|
||||||
|
"nvidia_drm"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
open = false;
|
||||||
|
powerManagement = enabled;
|
||||||
|
|
||||||
|
prime = {
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
GBM_BACKEND = "nvidia-drm";
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
NVD_BACKEND = "direct";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -15,8 +15,5 @@ in systemConfiguration {
|
||||||
useRoutingFeatures = "both";
|
useRoutingFeatures = "both";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Breaks with tailscale.
|
|
||||||
systemd.services.NetworkManager-wait-online = disabled;
|
|
||||||
|
|
||||||
networking.firewall.trustedInterfaces = [ interface ];
|
networking.firewall.trustedInterfaces = [ interface ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue