copy a little from nixpkgs/nixos

This commit is contained in:
Sakooooo 2023-08-13 19:27:13 +03:00
parent 26620cc535
commit f90c10441b
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -8,17 +8,18 @@
}:
with lib; let
cfg = config.modules.hardware.nvidia;
busIDType = lib.types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
in {
options.modules.hardware.nvidia = {
enable = mkEnableOption false;
prime.enable = mkEnableOption false;
prime.intelBusID = mkOption {
type = types.str;
default = null;
type = busIDType;
default = "";
};
prime.nvidiaBusId = mkOption {
type = types.str;
default = null;
type = busIDType;
default = "";
};
};