nix flake check seems to ignore nixConfig in flake #572

Closed
opened 2024-11-08 18:41:01 +00:00 by vikanezrimaya · 1 comment

Describe the bug

nix flake check doesn't seem to respect extra-experimental-features in nixConfig.

Steps To Reproduce

  1. Create a flake using an experimental feature (I use pipe-operator)
  2. Put nixConfig.extra-experimental-features = ["pipe-operator"]
  3. nix flake check
  4. See error:
    $ nix flake check
    error: Pipe operator is disabled
           at /nix/store/sh9wrc00k7pv347664ybbf2fkmx2ni7f-source/flake.nix:116:7:
              115|       }) // (self.nixosConfigurations
              116|       |> (nixpkgs.lib.filterAttrs
                 |       ^
              117|         (name: value:
    

Expected behavior

nix flake check runs successfully.

nix --version output

$ nix --version
nix (Lix, like Nix) 2.91.0

Additional context

Perhaps more commands also don't respect nixConfig. More research may be needed.

## Describe the bug `nix flake check` doesn't seem to respect `extra-experimental-features` in `nixConfig`. ## Steps To Reproduce 1. Create a flake using an experimental feature (I use `pipe-operator`) 2. Put `nixConfig.extra-experimental-features = ["pipe-operator"]` 3. `nix flake check` 4. See error: ```console $ nix flake check error: Pipe operator is disabled at /nix/store/sh9wrc00k7pv347664ybbf2fkmx2ni7f-source/flake.nix:116:7: 115| }) // (self.nixosConfigurations 116| |> (nixpkgs.lib.filterAttrs | ^ 117| (name: value: ``` ## Expected behavior `nix flake check` runs successfully. ## `nix --version` output ```console $ nix --version nix (Lix, like Nix) 2.91.0 ``` ## Additional context Perhaps more commands also don't respect `nixConfig`. More research may be needed.
vikanezrimaya added the
bug
label 2024-11-08 18:41:01 +00:00
Owner

you are asking lix to parse flake.nix while observing settings it can only obtain by parsing flake.nix first. there's no resolution for this. flakes simply cannot enable features affecting parsing for flake.nix via nixConfig.

you are asking lix to parse `flake.nix` while observing settings it can only obtain by parsing `flake.nix` first. there's no resolution for this. flakes simply cannot enable features affecting parsing for `flake.nix` via `nixConfig`.
jade added the
Status
invalid
label 2024-11-10 02:09:20 +00:00
jade closed this issue 2024-11-10 02:09:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#572
No description provided.