diff --git a/README.md b/README.md
index f7ec8a13..45a948b7 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
NixOS on WSL
-
+
diff --git a/configuration.nix b/configuration.nix
index ddd1de41..789cf59c 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,4 +1,4 @@
-{ pkgs, config, modulesPath, ... }:
+{ pkgs, ... }:
let
nixos-wsl = import ./default.nix;
@@ -28,5 +28,5 @@ in
experimental-features = nix-command flakes
'';
- system.stateVersion = "22.11";
+ system.stateVersion = "23.05";
}
diff --git a/flake.lock b/flake.lock
index 0c4d86f4..489bcc48 100644
--- a/flake.lock
+++ b/flake.lock
@@ -36,16 +36,16 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1688392541,
- "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
+ "lastModified": 1689605451,
+ "narHash": "sha256-u2qp2k9V1smCfk6rdUcgMKvBj3G9jVvaPHyeXinjN9E=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
+ "rev": "53657afe29748b3e462f1f892287b7e254c26d77",
"type": "github"
},
"original": {
"owner": "NixOS",
- "ref": "nixos-22.11",
+ "ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
diff --git a/flake.nix b/flake.nix
index 6bd808a2..b7bbc922 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,7 +2,7 @@
description = "NixOS WSL";
inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix
index e279d00d..ac763d73 100644
--- a/modules/wsl-distro.nix
+++ b/modules/wsl-distro.nix
@@ -182,6 +182,12 @@ in
# Include Windows %PATH% in Linux $PATH.
environment.extraInit = mkIf cfg.interop.includePath ''PATH="$PATH:$WSLPATH"'';
+ environment.systemPackages = [
+ (pkgs.runCommand "wslpath" { } ''
+ mkdir -p $out/bin
+ ln -s /init $out/bin/wslpath
+ '')
+ ];
})
(mkIf cfg.nativeSystemd {
wsl.wslConf = {
diff --git a/tests/shells.Tests.ps1 b/tests/shells.Tests.ps1
index 1c4df7be..184014b9 100644
--- a/tests/shells.Tests.ps1
+++ b/tests/shells.Tests.ps1
@@ -9,11 +9,16 @@ Describe "Shells" {
function Add-ShellTest([string]$package, [string]$executable) {
$temp = New-TemporaryFile
@"
- { pkgs, config, ... }:
- {
- imports = [ ./base.nix ];
+ { pkgs, lib, config, options, ... }:
+ with lib; {
+ imports = [ ./base.nix ];
- users.users.`${config.wsl.defaultUser}.shell = pkgs.$package;
+ config = mkMerge [
+ { users.users.`${config.wsl.defaultUser}.shell = pkgs.$package; }
+ (optionalAttrs (hasAttrByPath ["programs" "$package" "enable"] options) {
+ programs.$package.enable = true;
+ })
+ ];
}
"@ > $temp
$distro.InstallConfig($temp)