-
Notifications
You must be signed in to change notification settings - Fork 26
infinite recursion with nixos-hardware module #39
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
Comments
You can try put the nix code into a new file and import the file, see if that works? |
Copying the module and then importing it from there sadly still results in the same error. The only consistent thing I found to do is to remove the boot.loader prefix from the option name :/ Testing a little bit around at least brought me on how to replicate it easily:
I am importing that hardwareProfile in a nixosConfiguration that is using an aarch64-linux bee. But it happens at import time and such is reproducable on a x86_64-linux doing a |
@jkuball Hihi, I'm open to changing the option name if removing the |
Hey @KhashayarDanesh, thanks for reaching out! :) I would say your hardware module is totally fine with extending the boot loader list. I mean, this is exactly what it is doing. My problems with hive seem to be unrelated to your PR. In fact, I did try to build a minimal repro today so I could share it here, but: I can't get the problem to trigger on a simple setup. It has to be something else that I am doing in my configuration, so I will try to find the root cause and come back later, hopefully with more intel. |
Hi! I am back! I ignored this issue for weeks now, but recently I ran into the same problem again, after I updated my flake input facter-nixos-modules -- same infinite recursion error. So I tried to find the source of it, again with no luck. But I could create a minimal reproducing hive configuration in a repository: https://github.com/jkuball/hive-reproduce-39 The thing is, the same thing (importing disko & extending the options) does NOT result in an infinite recursion error in a flake not using hive or any other framework at all. So sadly this seems to be a hive issue (or at least a hive/disko incompatibility). Hopefully that context & repro helps anyone, and even if it is me trying to fix this by myself in the future :) |
This happens in a context of https://github.com/divnix/hive/blob/main/flake.nix#L98 where |
@blaggacao Line 16 in 05ae75e
This causes a problem because disko sets the whole I solved by using a custom checker which sets |
Very interesting analysis! Thank you! Would this potentially work instead of the current simple ubspecified?
I've seen that in nixpkgs anf it intuits like something something counter-recursion. |
@blaggacao Sorry for the late reply, but I was busy and still wanted to debug a bit (a lot actually) and find out what was actually the cause. Setting In this specific case:
Is there a reason for running the module check before evaluating the configuration (eval-config already performs the module check)? It seems to me that the bee check is only needed for evaluating bee options needed by the nixosConfigurations transformer (which uses the Maybe a solution would be to simply evaluate the configuration without checking the modules (so that we the nixosconfigurations transformer has a way to use the specified bee configuration) and leave the module checking to be done by eval-config. |
Hi!
I ran into an infinite recursion problem while trying to import a (soon-to-be) module from nixos-hardware, this one: NixOS/nixos-hardware#1269
I am not sure whether this is helpful, but I have added the full trace below.
nix flake check --show-trace
I already tried to understand the problem, but I only found out the source of the error. The module extends the nixos
boot.loader
by a new option:If I change this to be something top level, like just
kboot-conf
, everything is fine. Is it illegal to extend original nixos module options, or is it just something that hive does not support?Sadly I couldn't get a minimal example to also crash. But I presume it is reproducable by just adding
github:KhashayarDanesh/nixos-hardware
to the flake inputs and importinginputs.nixos-hardware.nixosModules.hardkernel-odroid-m1
.I'd love to get some help, or at least pointers on what to do. The easy way to fix it would probably be just to ask the PR maintainer to change the option name, but that feels wrong to me.
Thanks!
The text was updated successfully, but these errors were encountered: