Skip to content

Commit d5c74ff

Browse files
committed
generic-linux-gpu: warn when mixing gpu and nixGL
This should not happen normally, but only when the user explicitly sets both nixGL packages and force-enables the gpu module. They might have a valid reason for wanting a nixGL wrapper, so it's not a hard error.
1 parent 1814016 commit d5c74ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/targets/generic-linux/gpu/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@
113113
}
114114
];
115115

116+
warnings = lib.optional (config.targets.genericLinux.nixGL.packages != null) ''
117+
Both targets.genericLinux.gpu and targets.genericLinux.nixGL are enabled.
118+
This is an unsupported configuration. Only mix the two if you know what
119+
you are doing!
120+
'';
121+
116122
home.packages = [ setupPackage ];
117123

118124
home.activation.checkExistingGpuDrivers =

0 commit comments

Comments
 (0)