Skip to content

Commit 01112ba

Browse files
Merge pull request #268 from SuperSandro2000/23.05
2 parents 20a1f18 + 72b8000 commit 01112ba

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align=center>
22
NixOS on WSL<br />
33
<a href="https://matrix.to/#/#wsl:nixos.org"><img src="https://img.shields.io/matrix/wsl:nixos.org?server_fqdn=nixos.ems.host&logo=matrix" alt="Matrix Chat" /></a>
4-
<a href="https://github.com/NixOS/nixpkgs/tree/nixos-22.11"><img src="https://img.shields.io/badge/nixpkgs-22.11-brightgreen" alt="nixpkgs 22.11" /></a>
4+
<a href="https://github.com/NixOS/nixpkgs/tree/nixos-23.05"><img src="https://img.shields.io/badge/nixpkgs-23.05-brightgreen" alt="nixpkgs 23.05" /></a>
55
<a href="https://github.com/nix-community/NixOS-WSL/releases"><img alt="Downloads" src="https://img.shields.io/github/downloads/nix-community/NixOS-WSL/total"></a>
66
</h1>
77

configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, config, modulesPath, ... }:
1+
{ pkgs, ... }:
22

33
let
44
nixos-wsl = import ./default.nix;
@@ -28,5 +28,5 @@ in
2828
experimental-features = nix-command flakes
2929
'';
3030

31-
system.stateVersion = "22.11";
31+
system.stateVersion = "23.05";
3232
}

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "NixOS WSL";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
66
flake-utils.url = "github:numtide/flake-utils";
77

88
flake-compat = {

modules/wsl-distro.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ in
182182

183183
# Include Windows %PATH% in Linux $PATH.
184184
environment.extraInit = mkIf cfg.interop.includePath ''PATH="$PATH:$WSLPATH"'';
185+
environment.systemPackages = [
186+
(pkgs.runCommand "wslpath" { } ''
187+
mkdir -p $out/bin
188+
ln -s /init $out/bin/wslpath
189+
'')
190+
];
185191
})
186192
(mkIf cfg.nativeSystemd {
187193
wsl.wslConf = {

tests/shells.Tests.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ Describe "Shells" {
99
function Add-ShellTest([string]$package, [string]$executable) {
1010
$temp = New-TemporaryFile
1111
@"
12-
{ pkgs, config, ... }:
13-
{
14-
imports = [ ./base.nix ];
12+
{ pkgs, lib, config, options, ... }:
13+
with lib; {
14+
imports = [ ./base.nix ];
1515
16-
users.users.`${config.wsl.defaultUser}.shell = pkgs.$package;
16+
config = mkMerge [
17+
{ users.users.`${config.wsl.defaultUser}.shell = pkgs.$package; }
18+
(optionalAttrs (hasAttrByPath ["programs" "$package" "enable"] options) {
19+
programs.$package.enable = true;
20+
})
21+
];
1722
}
1823
"@ > $temp
1924
$distro.InstallConfig($temp)

0 commit comments

Comments
 (0)