Skip to content

Commit

Permalink
Merge pull request #300 from nix-community/fixups
Browse files Browse the repository at this point in the history
fix: fix config generation for legacy/tests
  • Loading branch information
K900 authored Sep 30, 2023
2 parents 8735bdf + dd632e5 commit cadde47
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
8 changes: 1 addition & 7 deletions modules/build-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions tests/docker/docker-native.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
];

wsl.enable = true;
wsl.nativeSystemd = false;

users.users.nixos.extraGroups = [ "docker" ];

virtualisation.docker = {
Expand Down
1 change: 1 addition & 0 deletions tests/login-shell/session-variables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ in
];

wsl.enable = true;
wsl.nativeSystemd = false;

home-manager.users.nixos = { ... }: {
home = {
Expand Down
1 change: 1 addition & 0 deletions tests/shells.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions tests/username-change/username-change.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
];

wsl.enable = true;
wsl.nativeSystemd = false;
wsl.defaultUser = "different-name";
}

0 comments on commit cadde47

Please sign in to comment.