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
This commit is contained in:
yuu 2022-07-09 20:53:35 -03:00
parent 87ac6eda56
commit ce2e4707b7
No known key found for this signature in database
GPG Key ID: 416F303B43C20AC3

View File

@ -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
{