- fix: nvidia.nix missing semicolon (build error) - remove: ranger, vim from core/pkg.nix (yazi + neovim covers) - remove: htop duplicate in home/pkg.nix (keep in system) - replace: neofetch with fastfetch in home/pkg.nix - remove: nixd LSP, keep nil only in nvchad.nix - remove: empty server/pkg.nix and no-op server/firewall.nix - remove: redundant services.pulseaudio.enable = false default - add: comprehensive README.md documenting architecture
46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
{ config, ... }:
|
||
{
|
||
services.xserver.videoDrivers = [ "nvidia" ];
|
||
|
||
hardware.graphics.enable = true;
|
||
hardware.nvidia = {
|
||
modesetting.enable = true;
|
||
open = true;
|
||
nvidiaSettings = true;
|
||
powerManagement.enable = false;
|
||
powerManagement.finegrained = false;
|
||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||
};
|
||
|
||
# 备用方案(当前禁用):
|
||
# 如果后续要启用 AMD 核显 + NVIDIA 独显切换,请取消下面整段注释。
|
||
#
|
||
# 重要提醒:
|
||
# 1) 先确认两张显卡的 PCIe Bus ID,再启用;否则图形界面可能无法启动。
|
||
# 2) 获取命令:lspci | grep -E "VGA|3D"
|
||
# 3) 示例输出常见为 "01:00.0"、"06:00.0"(16 进制)。
|
||
# 4) Nix 配置常用写法:PCI:<bus-dec>:<device-dec>:<function>
|
||
# 例如 01:00.0 -> PCI:1:0:0;06:00.0 -> PCI:6:0:0
|
||
#
|
||
# let
|
||
# amdgpuBusId = "PCI:6:0:0";
|
||
# nvidiaBusId = "PCI:1:0:0";
|
||
# in {
|
||
# services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
|
||
# hardware.nvidia.prime = {
|
||
# offload.enable = true;
|
||
# offload.enableOffloadCmd = true;
|
||
# amdgpuBusId = amdgpuBusId;
|
||
# nvidiaBusId = nvidiaBusId;
|
||
# };
|
||
# specialisation.nvidia-sync.configuration = {
|
||
# hardware.nvidia.prime = {
|
||
# offload.enable = lib.mkForce false;
|
||
# sync.enable = true;
|
||
# amdgpuBusId = amdgpuBusId;
|
||
# nvidiaBusId = nvidiaBusId;
|
||
# };
|
||
# };
|
||
# }
|
||
}
|