Skip to content

fix(generation): do not fail if nixos-version.json is not found#85

Merged
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:handle-nonexistent-nixos-version-json-file
Jul 7, 2025
Merged

fix(generation): do not fail if nixos-version.json is not found#85
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:handle-nonexistent-nixos-version-json-file

Conversation

@water-sucks
Copy link
Copy Markdown
Collaborator

The nixos generation list command relies on fetching generation information. However, if the nixos-version.json file was not found, an error would be returned.

This is the case when generations are created without the nixos-cli NixOS module in place, such as on initial installation, since the nixos-cli module is not supported in codegen yet.

Since information can be left empty about a generation, and we already fallback to using the nixos-version.

Closes #83.

@water-sucks water-sucks merged commit 258f7a6 into nix-community:main Jul 7, 2025
1 check passed
@water-sucks water-sucks deleted the handle-nonexistent-nixos-version-json-file branch July 7, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The command nixos generation list shows on result with "legacy" import (no flakes)

1 participant