Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with flake-parts seems to cause an infinite recursion #349

Closed
Kreyren opened this issue Jul 11, 2024 · 4 comments
Closed

Integration with flake-parts seems to cause an infinite recursion #349

Kreyren opened this issue Jul 11, 2024 · 4 comments

Comments

@Kreyren
Copy link

Kreyren commented Jul 11, 2024

Referencing: NiXium-org/NiXium#118 (comment)

I am trying to declare the nixosGenerator with a workaround for NixOS/nixpkgs#286196 as a module (so that it can be used for other things) to be able to declare it as a package (to be able to set up a CI/CD to produce the build and additional management) so that it can be declared as an app for nix run.

Where using packages.aarch64-linux.nixos-tsvetan-recovery = self.inputs.nixos-generators.nixosGenerate seems to cause an infinite recursion when used with flake-parts, i was discussing this in NixOS room where it was suggested to be a nixos-generator bug, thus filing this issue.

Kreyren added a commit to Kreyren/nixos-config that referenced this issue Jul 11, 2024
@DavHau
Copy link
Member

DavHau commented Jul 12, 2024

you put a flake. prefix in front of your declaration, so it becomes flake.packages.aarch64-linux.nixos-tsvetan-recovery = ....

It is weird that flake parts crashes with an infinite recursion because of that. Maybe report this at flake-parts.

@Kreyren
Copy link
Author

Kreyren commented Jul 13, 2024

It causes infinite recursion even with the flake. prefix removed from relevant configuration NiXium-org/NiXium@0919224 (#118)

Cross-Referencing: hercules-ci/flake-parts#236

@DavHau
Copy link
Member

DavHau commented Jul 13, 2024

@Kreyren the other declarations in the file also need to be prefixed with flake..
I tried is yesterday and it worked

@Kreyren
Copy link
Author

Kreyren commented Jul 16, 2024

@DavHau Thanks a lot! <3 i think i made it work, it seems to trigger an infinite recursion when the option is called without a flake or when the option fails to evaluate, so probably unrelated to nixos-generators.

@Kreyren Kreyren closed this as completed Jul 16, 2024
Kreyren added a commit to Kreyren/nixos-config that referenced this issue Aug 10, 2024
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

No branches or pull requests

2 participants