Skip to content

Commit cadde47

Browse files
authored
Merge pull request #300 from nix-community/fixups
fix: fix config generation for legacy/tests
2 parents 8735bdf + dd632e5 commit cadde47

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

modules/build-tarball.nix

+1-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let
2121
2222
wsl.enable = true;
2323
wsl.defaultUser = "nixos";
24-
${cfg.extraTarballConfig}
24+
${lib.optionalString (!cfg.nativeSystemd) "wsl.nativeSystemd = false;"}
2525
2626
# This value determines the NixOS release from which the default
2727
# settings for stateful data, like file locations and database versions
@@ -34,12 +34,6 @@ let
3434
'';
3535
in
3636
{
37-
options.wsl.extraTarballConfig = mkOption {
38-
type = types.str;
39-
internal = true;
40-
default = "";
41-
};
42-
4337
# These options make no sense without the wsl-distro module anyway
4438
config = mkIf cfg.enable {
4539
system.build.tarballBuilder = pkgs.writeShellApplication {

tests/docker/docker-native.nix

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
];
55

66
wsl.enable = true;
7+
wsl.nativeSystemd = false;
8+
79
users.users.nixos.extraGroups = [ "docker" ];
810

911
virtualisation.docker = {

tests/login-shell/session-variables.nix

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ in
99
];
1010

1111
wsl.enable = true;
12+
wsl.nativeSystemd = false;
1213

1314
home-manager.users.nixos = { ... }: {
1415
home = {

tests/shells.Tests.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Describe "Shells" {
1818
config = mkMerge [
1919
{
2020
wsl.enable = true;
21+
wsl.nativeSystemd = false;
2122
users.users.nixos.shell = pkgs.$package;
2223
}
2324
(optionalAttrs (hasAttrByPath ["programs" "$package" "enable"] options) {

tests/username-change/username-change.nix

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
];
55

66
wsl.enable = true;
7+
wsl.nativeSystemd = false;
78
wsl.defaultUser = "different-name";
89
}

0 commit comments

Comments
 (0)