Skip to content

The option definition `wsl.nativeSystemd' in no longer has any effect; please remove it. #628

Description

@TheAyes

Bug description

I'm currently trying to build nixos-wsl with flakes but it throws me an error I can't resolve

To Reproduce

Try to build the system with nixos-wsl enabled

Logs

[ayes@leda:/mnt/c/Projekte/.ayes]$ nixos-rebuild build --use-remote-sudo -v --flake .
$ cat /proc/sys/kernel/hostname
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."leda".config.system.build.toplevel -v
warning: Git tree '/mnt/c/Projekte/.ayes' is dirty
error:
       … in the left operand of the update (//) operator
         at «nix-internal»/call-flake.nix:69:13:
           68|             # This is shadowed in the next //
           69|             // sourceInfo
             |             ^
           70|             // {

       … while evaluating the attribute 'config.flake'
         at /nix/store/9jn1cxgvdiv2jd7b8g794qiv16xxv7bq-source/modules.nix:334:9:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          335|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `assertions' does not exist. Definition values:
       - In `/nix/store/ni33bns6g3qpcnb7f8r3bk8acxp7v0ag-source/modules/systemd':
           [
             {
               assertion = true;
               message = ''
                 The option definition `wsl.nativeSystemd' in  no longer has any effect; please remove it.
           ...

[ayes@leda:/mnt/c/Projekte/.ayes]$

WSL version

WSL-Version: 2.4.11.0                                                                                                                                                                                                                                                                                               
Kernelversion: 5.15.167.4-1                                                                                                                                                                                                                                                                                         
WSLg-Version: 1.0.65
MSRDC-Version: 1.2.5716
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.26100.1-240331-1435.ge-release
Windows-Version: 10.0.26100.2894

My configuration:

  imports = [
  ];
  system.stateVersion = "23.11";
  wsl = {
    enable = false;

    #defaultUser = "ayes";

    wslConf = {
      network.hostname = "leda";
    };
  };

  environment = {
    systemPackages = with pkgs; [
    ];
  };
}

my flake

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixos-wsl.url = "github:nix-community/NixOS-WSL/main";

    flake-parts.url = "github:hercules-ci/flake-parts";
  };

  outputs = inputs @ {
    nixpkgs,
    flake-parts,
    ...
  }:
    flake-parts.lib.mkFlake {inherit inputs;} {
      imports = [
        inputs.nixos-wsl.nixosModules.default

        ./modules/flake/host-manager
      ];

      systems = [
        "x86_64-linux"
      ];

      host-manager = {
        enable = false;
        hosts = {
          leda.enable = true;
        };
      };

      flake = {
      };

      perSystem = {
        pkgs,
        config,
        ...
      }: {
        formatter = pkgs.nixpkgs-fmt;
      };
    };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions