1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00
This commit is contained in:
RGBCube 2024-06-13 15:58:20 +03:00
parent 474e1455ee
commit 2778deb4ea
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
3 changed files with 37 additions and 11 deletions

View file

@ -17,14 +17,9 @@ systemConfiguration {
"xhci_pci"
];
boot.kernelModules = [ "kvm-intel" ];
imports = [ hardware.nixosModules.common-gpu-nvidia ];
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
boot.kernelModules = [
"kvm-intel"
];
fileSystems."/" = {
device = "/dev/disk/by-label/root";

34
hosts/enka/nvidia.nix Normal file
View 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";
};
}

View file

@ -15,8 +15,5 @@ in systemConfiguration {
useRoutingFeatures = "both";
};
# Breaks with tailscale.
systemd.services.NetworkManager-wait-online = disabled;
networking.firewall.trustedInterfaces = [ interface ];
}