nixos-combined-flake/modules/nixos/wsl/default.nix

19 lines
344 B
Nix

{ config, lib, vars, inputs, ... }:
let
inherit (vars) username hostName;
in
{
imports = [
inputs.nixos-wsl.nixosModules.wsl
];
config = lib.mkIf config.wsl.enable {
wsl = {
defaultUser = username;
nativeSystemd = true;
useWindowsDriver = true;
wslConf = { network.hostname = hostName; };
};
};
}