From ce2e4707b782657e077a0ef072cbd67756cae673 Mon Sep 17 00:00:00 2001 From: yuu Date: Sat, 9 Jul 2022 20:53:35 -0300 Subject: [PATCH] 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 --- nixos/modules/hardware/video/nvidia.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index b4717719661a..5fcd165186ff 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 {