Add configuration for WSL2

This commit is contained in:
Dave Gallant
2022-07-02 22:56:20 +00:00
parent 920602e0fe
commit d74ec8f89b
21 changed files with 1101 additions and 14 deletions

View File

@@ -0,0 +1,38 @@
{
lib,
pkgs,
config,
modulesPath,
...
}:
with lib; let
nixos-wsl = import ./nixos-wsl;
in {
imports = [
"${modulesPath}/profiles/minimal.nix"
nixos-wsl.nixosModules.wsl
];
nixpkgs.config.allowUnfree = true;
system.stateVersion = "unstable";
networking = {hostName = "gallantis";};
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "dave";
startMenuLaunchers = true;
# Enable integration with Docker Desktop
docker.enable = true;
};
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
}