diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 6de5b99a1ee6..c7c440bea19c 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -68,7 +68,7 @@ in }; hardware.nvidia.prime.nvidiaBusId = mkOption { - type = types.str; + type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; default = ""; example = "PCI:1:0:0"; description = '' @@ -78,7 +78,7 @@ in }; hardware.nvidia.prime.intelBusId = mkOption { - type = types.str; + type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; default = ""; example = "PCI:0:2:0"; description = '' @@ -88,7 +88,7 @@ in }; hardware.nvidia.prime.amdgpuBusId = mkOption { - type = types.str; + type = types.strMatching "[[:print:]]+\:[0-9]{1,3}\:[0-9]{1,2}\:[0-9]"; default = ""; example = "PCI:4:0:0"; description = ''