mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 13:12:10 -08:00
31 lines
595 B
Nix
31 lines
595 B
Nix
{
|
|
inputs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.liminalOS.wsl;
|
|
in
|
|
{
|
|
imports = lib.mkIf cfg.enable [
|
|
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 {
|
|
enable = true;
|
|
defaultUser = config.liminalOS.username;
|
|
useWindowsDriver = true;
|
|
};
|
|
}
|