diff --git a/modules/build-tarball.nix b/modules/build-tarball.nix index f48c9cec..577f0448 100644 --- a/modules/build-tarball.nix +++ b/modules/build-tarball.nix @@ -21,7 +21,7 @@ let wsl.enable = true; wsl.defaultUser = "nixos"; - ${cfg.extraTarballConfig} + ${lib.optionalString (!cfg.nativeSystemd) "wsl.nativeSystemd = false;"} # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -34,12 +34,6 @@ let ''; in { - options.wsl.extraTarballConfig = mkOption { - type = types.str; - internal = true; - default = ""; - }; - # These options make no sense without the wsl-distro module anyway config = mkIf cfg.enable { system.build.tarballBuilder = pkgs.writeShellApplication { diff --git a/tests/docker/docker-native.nix b/tests/docker/docker-native.nix index f1194824..d6f76f04 100644 --- a/tests/docker/docker-native.nix +++ b/tests/docker/docker-native.nix @@ -4,6 +4,8 @@ ]; wsl.enable = true; + wsl.nativeSystemd = false; + users.users.nixos.extraGroups = [ "docker" ]; virtualisation.docker = { diff --git a/tests/login-shell/session-variables.nix b/tests/login-shell/session-variables.nix index 6829bbfb..c3cca3c7 100644 --- a/tests/login-shell/session-variables.nix +++ b/tests/login-shell/session-variables.nix @@ -9,6 +9,7 @@ in ]; wsl.enable = true; + wsl.nativeSystemd = false; home-manager.users.nixos = { ... }: { home = { diff --git a/tests/shells.Tests.ps1 b/tests/shells.Tests.ps1 index 6bcc6406..c1dbf735 100644 --- a/tests/shells.Tests.ps1 +++ b/tests/shells.Tests.ps1 @@ -18,6 +18,7 @@ Describe "Shells" { config = mkMerge [ { wsl.enable = true; + wsl.nativeSystemd = false; users.users.nixos.shell = pkgs.$package; } (optionalAttrs (hasAttrByPath ["programs" "$package" "enable"] options) { diff --git a/tests/username-change/username-change.nix b/tests/username-change/username-change.nix index 32d7e1e0..fc4609ff 100644 --- a/tests/username-change/username-change.nix +++ b/tests/username-change/username-change.nix @@ -4,5 +4,6 @@ ]; wsl.enable = true; + wsl.nativeSystemd = false; wsl.defaultUser = "different-name"; }