Compare commits
15 commits
33efba78de
...
2ad4895454
Author | SHA1 | Date | |
---|---|---|---|
2ad4895454 | |||
12fe9fd0b9 | |||
f77c7ca594 | |||
09d5cd2c8a | |||
786dd6a991 | |||
c1b638a61b | |||
2507e0b794 | |||
40372d3a9e | |||
971fc26b06 | |||
3547412cf1 | |||
857679a823 | |||
20cccae696 | |||
6cb8713207 | |||
2bf23a5cfa | |||
3455919041 |
|
@ -45,11 +45,11 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = (cfg.hybrid.busIDs.nvidia != "");
|
assertion = (cfg.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.hybrid.busIDs.intel != "" || cfg.busIDs.amd != "");
|
assertion = (cfg.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 = cfg.hybrid.busIDs.intel;
|
intelBusId = lib.mkIf (cfg.hybrid.busIDs.intel != "") cfg.hybrid.busIDs.intel;
|
||||||
amdgpuBusId = cfg.hybrid.busIDs.amd;
|
amdgpuBusId = lib.mkIf (cfg.hybrid.busIDs.amd != "") cfg.hybrid.busIDs.amd;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue