Skip to content

nix flake lock refuses to create flake.lock #15634

@blitz

Description

@blitz

Describe the bug

nix flake lock refuses to recreate a missing flake.lock:

$ nix flake lock
error:
       … while fetching the input 'git+file:///home/julian/src/own/nix-configs'

       error: path '//home/julian/src/own/nix-configs/flake.lock' does not exist

Steps To Reproduce

  1. Have a merge conflict in flake.lock
  2. Delete flake.lock: rm flake.lock
  3. nix flake lock

Expected behavior

flake.lock is recreated.

Metadata

nix-env (Nix) 2.31.3

Additional context

This looks like a regression. Works with lix.

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions