modified: configuration.nix
This commit is contained in:
parent
69364bc04b
commit
08f2a072ba
1 changed files with 11 additions and 1 deletions
|
|
@ -18,6 +18,12 @@ let
|
|||
${pkgs.pciutils}/bin/lspci | ${pkgs.busybox}/bin/grep NVIDIA | ${pkgs.busybox}/bin/grep VGA > $out || true
|
||||
''
|
||||
)) != "";
|
||||
isAdata = # ADATA is a famous cheap troubleful NVMe controllers
|
||||
(builtins.readFile (
|
||||
pkgs.runCommandLocal "isAdata" { } ''
|
||||
${pkgs.pciutils}/bin/lspci | ${pkgs.busybox}/bin/grep ADATA | ${pkgs.busybox}/bin/grep -i NVMe > $out || true
|
||||
''
|
||||
)) != "";
|
||||
in
|
||||
{
|
||||
users.users.student = {
|
||||
|
|
@ -92,7 +98,11 @@ in
|
|||
open = false;
|
||||
nvidiaSettings = false;
|
||||
};
|
||||
boot.kernelParams = if isNvidia then [ "nvidia-drm.modeset=1" ] else [ ];
|
||||
services.udev.extraRules = if isAdata then ''
|
||||
ACTION=="add|change",KERNEL=="nvme[0-9]", ATTR{queue/scheduler}="none"
|
||||
'' else "";
|
||||
boot.kernelParams = lib.optionals isNvidia [ "nvidia-drm.modeset=1" ]
|
||||
++ lib.optionals isAdata [ "nvme_core.default_ps_max_latency_us=0" "nvme_core.io_timeout=4294967295" ];
|
||||
boot.blacklistedKernelModules = if isNvidia then [ "nouveau" ] else [ ];
|
||||
boot.extraModprobeConfig =
|
||||
if isNvidia then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue