Merge pull request #169052 from symphorien/nvidia_empty_default
nixos/nvidia: fix type of bus ID option to accept empty string
This commit is contained in:
commit
f66a86b3a0
1 changed files with 4 additions and 3 deletions
|
@ -24,6 +24,7 @@ let
|
||||||
primeEnabled = syncCfg.enable || offloadCfg.enable;
|
primeEnabled = syncCfg.enable || offloadCfg.enable;
|
||||||
nvidiaPersistencedEnabled = cfg.nvidiaPersistenced;
|
nvidiaPersistencedEnabled = cfg.nvidiaPersistenced;
|
||||||
nvidiaSettings = cfg.nvidiaSettings;
|
nvidiaSettings = cfg.nvidiaSettings;
|
||||||
|
busIDType = types.strMatching "([[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -68,7 +69,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia.prime.nvidiaBusId = mkOption {
|
hardware.nvidia.prime.nvidiaBusId = mkOption {
|
||||||
type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]";
|
type = busIDType;
|
||||||
default = "";
|
default = "";
|
||||||
example = "PCI:1:0:0";
|
example = "PCI:1:0:0";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -78,7 +79,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia.prime.intelBusId = mkOption {
|
hardware.nvidia.prime.intelBusId = mkOption {
|
||||||
type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]";
|
type = busIDType;
|
||||||
default = "";
|
default = "";
|
||||||
example = "PCI:0:2:0";
|
example = "PCI:0:2:0";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -88,7 +89,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.nvidia.prime.amdgpuBusId = mkOption {
|
hardware.nvidia.prime.amdgpuBusId = mkOption {
|
||||||
type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]";
|
type = busIDType;
|
||||||
default = "";
|
default = "";
|
||||||
example = "PCI:4:0:0";
|
example = "PCI:4:0:0";
|
||||||
description = ''
|
description = ''
|
||||||
|
|
Loading…
Reference in a new issue