Skip to content

Commit

Permalink
Merge pull request #268 from SuperSandro2000/23.05
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Jul 24, 2023
2 parents 20a1f18 + 72b8000 commit 01112ba
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align=center>
NixOS on WSL<br />
<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>
<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>
<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>
<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>
</h1>

Expand Down
4 changes: 2 additions & 2 deletions configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, config, modulesPath, ... }:
{ pkgs, ... }:

let
nixos-wsl = import ./default.nix;
Expand Down Expand Up @@ -28,5 +28,5 @@ in
experimental-features = nix-command flakes
'';

system.stateVersion = "22.11";
system.stateVersion = "23.05";
}
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
13 changes: 9 additions & 4 deletions tests/shells.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01112ba

Please sign in to comment.