Skip to content

Documentation on enabling flakes is unclear #604

Open
@zachauten

Description

@zachauten

Bug description

I'm a little unsure how to interpret the page of the documentation on how to enable flakes.

First add a nixos-wsl input, then add nixos-wsl.nixosModules.default to your nixos configuration

To me, this reads as instructions to add the following code block to the system configuration at /etc/nixos/configuration.nix, that I've been working in as I follow the previous steps in the docs. But the code snippet is also labelled with:

Below is a minimal flake.nix for you to get started:

Which makes me think it's supposed to go in a standalone file. Adding it to /etc/nixos/configuration.nix gave me a big fat error message, so I'm pretty sure I'm not supposed to do that.

I'm new to NixOS, but I've read some things online about flakes, and found them useful when I used the Nix package manager on macOS & Debian. But I also didn't see them mentioned much at all in the manual, and the Nix wiki says they're still experimental. I'm not sure if they're recommended on WSL, or how to best go about enabling them.

It might be a good idea to add some info to that page of the NixOS-WSL documentation to answer:

  1. Is enabling flakes reccomended?
  2. Links to relevant documentation on how to get started using flakes.
  3. More context around the relationship between the system configuration and the given flake.nix example.

Thanks!

To Reproduce

Steps to reproduce the behavior:

Logs

Include relevant console logs

WSL version

I'm using 2

Please paste the output of wsl --version here

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions