about summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authoryuu <yuuyin@protonmail.com>2022-07-09 20:53:35 -0300
committeryuu <yuuyin@protonmail.com>2022-07-10 02:48:40 -0300
commitce2e4707b782657e077a0ef072cbd67756cae673 (patch)
treebcd2959c2c7b1a2debb8efe137c5f80c52e9c809 /nixos/modules/hardware
parent87ac6eda56acfe22bf6853736b05f83ce257ee02 (diff)
hardware/nvidia: add @ to constraint on busIDType
On some configurations, the only known syntax that works
requires the `@` character, such as `intelBusId = "0@0:2:0";`  and
`nvidiaBusId = "1@1:0:0";` [1].

[1]. https://discourse.nixos.org/t/struggling-with-nvidia-prime/13794/4
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/video/nvidia.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index b4717719661aa..5fcd165186ffd 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -24,7 +24,7 @@ let
   primeEnabled = syncCfg.enable || offloadCfg.enable;
   nvidiaPersistencedEnabled =  cfg.nvidiaPersistenced;
   nvidiaSettings = cfg.nvidiaSettings;
-  busIDType = types.strMatching "([[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
+  busIDType = types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
 in
 
 {