Compare commits
14 commits
2ad4895454
...
33efba78de
Author | SHA1 | Date | |
---|---|---|---|
33efba78de | |||
1ff80eed70 | |||
e11982a0ac | |||
ae5c57087b | |||
a5ba014019 | |||
e598b4460b | |||
d7c8dc7079 | |||
e91383e2b0 | |||
6a9ddcf0fc | |||
03fc24f588 | |||
e787e42400 | |||
04fe94d274 | |||
ef5fd7ef2a | |||
5184f31f41 |
|
@ -45,11 +45,11 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = (cfg.busIDs.nvidia == "");
|
assertion = (cfg.hybrid.busIDs.nvidia != "");
|
||||||
message = "You need to define a bus ID for your Nvidia GPU. To learn how to find the bus ID, see https://nixos.wiki/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
message = "You need to define a bus ID for your Nvidia GPU. To learn how to find the bus ID, see https://nixos.wiki/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = (cfg.busIDs.intel == "" && cfg.busIDs.amd == "");
|
assertion = (cfg.hybrid.busIDs.intel != "" || cfg.busIDs.amd != "");
|
||||||
message = "You need to define a bus ID for your non-Nvidia GPU. To learn how to find your bus ID, see https://nixos.wiki/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
message = "You need to define a bus ID for your non-Nvidia GPU. To learn how to find your bus ID, see https://nixos.wiki/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -73,8 +73,8 @@ in
|
||||||
sync.enable = lib.mkIf cfg.hybrid.sync true;
|
sync.enable = lib.mkIf cfg.hybrid.sync true;
|
||||||
|
|
||||||
nvidiaBusId = cfg.hybrid.busIDs.nvidia;
|
nvidiaBusId = cfg.hybrid.busIDs.nvidia;
|
||||||
intelBusId = lib.mkIf (cfg.hybrid.busIDs.intel != "") cfg.hybrid.busIDs.intel;
|
intelBusId = cfg.hybrid.busIDs.intel;
|
||||||
amdgpuBusId = lib.mkIf (cfg.hybrid.busIDs.amd != "") cfg.hybrid.busIDs.amd;
|
amdgpuBusId = cfg.hybrid.busIDs.amd;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue