lol

Merge pull request #169052 from symphorien/nvidia_empty_default

nixos/nvidia: fix type of bus ID option to accept empty string

authored by

Guillaume Girol and committed by
GitHub
f66a86b3 5bd659fb

+4 -3
+4 -3
nixos/modules/hardware/video/nvidia.nix
··· 24 24 primeEnabled = syncCfg.enable || offloadCfg.enable; 25 25 nvidiaPersistencedEnabled = cfg.nvidiaPersistenced; 26 26 nvidiaSettings = cfg.nvidiaSettings; 27 + busIDType = types.strMatching "([[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9])?"; 27 28 in 28 29 29 30 { ··· 68 69 }; 69 70 70 71 hardware.nvidia.prime.nvidiaBusId = mkOption { 71 - type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; 72 + type = busIDType; 72 73 default = ""; 73 74 example = "PCI:1:0:0"; 74 75 description = '' ··· 78 79 }; 79 80 80 81 hardware.nvidia.prime.intelBusId = mkOption { 81 - type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; 82 + type = busIDType; 82 83 default = ""; 83 84 example = "PCI:0:2:0"; 84 85 description = '' ··· 88 89 }; 89 90 90 91 hardware.nvidia.prime.amdgpuBusId = mkOption { 91 - type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; 92 + type = busIDType; 92 93 default = ""; 93 94 example = "PCI:4:0:0"; 94 95 description = ''