liminalOS/modules/linux/wsl/default.nix

32 lines
595 B
Nix
Raw Normal View History

2024-11-26 17:15:31 -08:00
{
inputs,
config,
lib,
...
}:
let
cfg = config.liminalOS.wsl;
in
{
imports = lib.mkIf cfg.enable [
2024-11-26 17:15:31 -08:00
inputs.nixos-wsl.nixosModules.default
];
options = {
enable = lib.mkEnableOption "wsl";
module = lib.mkOption {
type = lib.types.submodule;
default = inputs.nixos-wsl.nixosModules.default;
description = ''
NixOS WSL module. Defaults to <https://github.com/nix-community/NixOS-WSL>
'';
};
};
config.wsl = lib.mkIf cfg.enable {
2024-11-26 17:15:31 -08:00
enable = true;
defaultUser = config.liminalOS.username;
2024-11-26 17:15:31 -08:00
useWindowsDriver = true;
};
}