Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/usbip.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@ in

targets.multi-user.wants = map (busid: "usbip-auto-attach@${busid}.service") cfg.autoAttach;
};

wsl.kernelModules = [ "vhci-hcd" ];
};
}
11 changes: 11 additions & 0 deletions modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ in
options.wsl = with types; {
enable = mkEnableOption "support for running NixOS as a WSL distribution";
useWindowsDriver = mkEnableOption "OpenGL driver from the Windows host";
kernelModules = mkOption {
type = listOf str;
default = [ ];
description = ''
The set of kernel modules to be loaded in the second stage of
the boot process via systemd-modules-load.service.
'';
};
binShPkg = mkOption {
type = package;
internal = true;
Expand Down Expand Up @@ -115,6 +123,9 @@ in
(mkIf config.wsl.wslConf.network.generateResolvConf {
"resolv.conf".enable = false;
})
(mkIf (cfg.kernelModules != [ ]) {
"modules-load.d/nixos.conf".text = concatStringsSep "\n" cfg.kernelModules;
})
];
};

Expand Down
Loading