Skip to content

What language is flake.nix written in? #4945

@dasJ

Description

@dasJ

This issue may sound silly but it's actually not clear to me what language they are written in.
The syntax and file ending both look like Nix but the manual doesn't apply most of the time.
The manual makes it seem like this should work:

{
  description = "Testflake";
  outputs = import ./outputs.nix;
}

but running that results in

error: expected a function but got a thunk at /nix/store/lm4pyqnkbiwvp2kxjd64nqb2xkdxmbfx-source/flake.nix:4:3

So what language are flake.nix files written in (is there any specification or documentation) and why is that language not Nix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions