We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d72abaf + eac32ce commit 70d7e2eCopy full SHA for 70d7e2e
modules/wsl-distro.nix
@@ -9,6 +9,7 @@ in
9
10
options.wsl = with types; {
11
enable = mkEnableOption "support for running NixOS as a WSL distribution";
12
+ useWindowsDriver = mkEnableOption "OpenGL driver from the Windows host";
13
binShPkg = mkOption {
14
type = package;
15
internal = true;
@@ -70,7 +71,16 @@ in
70
71
# WSL does not support virtual consoles
72
console.enable = false;
73
- hardware.opengl.enable = true; # Enable GPU acceleration
74
+ hardware.opengl = {
75
+ enable = true; # Enable GPU acceleration
76
+
77
+ extraPackages = mkIf cfg.useWindowsDriver [
78
+ (pkgs.runCommand "wsl-lib" { } ''
79
+ mkdir "$out"
80
+ ln -s /usr/lib/wsl/lib "$out/lib"
81
+ '')
82
+ ];
83
+ };
84
85
environment = {
86
# Only set the options if the files are managed by WSL
0 commit comments