copy a little from nixpkgs/nixos
This commit is contained in:
parent
26620cc535
commit
f90c10441b
1 changed files with 5 additions and 4 deletions
|
@ -8,17 +8,18 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.modules.hardware.nvidia;
|
cfg = config.modules.hardware.nvidia;
|
||||||
|
busIDType = lib.types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
|
||||||
in {
|
in {
|
||||||
options.modules.hardware.nvidia = {
|
options.modules.hardware.nvidia = {
|
||||||
enable = mkEnableOption false;
|
enable = mkEnableOption false;
|
||||||
prime.enable = mkEnableOption false;
|
prime.enable = mkEnableOption false;
|
||||||
prime.intelBusID = mkOption {
|
prime.intelBusID = mkOption {
|
||||||
type = types.str;
|
type = busIDType;
|
||||||
default = null;
|
default = "";
|
||||||
};
|
};
|
||||||
prime.nvidiaBusId = mkOption {
|
prime.nvidiaBusId = mkOption {
|
||||||
type = types.str;
|
type = busIDType;
|
||||||
default = null;
|
default = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue