"Infinite recursion encountered" by making module configurable

I’ve tried narrowing down my flake output to literally just my xserver config and my machine’s settings with no other software; no dice.

I’ve also tried disabling nonfree software as per this older, probably unrelated Github issue: Infinite recursion when using allowUnfree · Issue #24251 · NixOS/nixpkgs · GitHub – that still doesn’t help (unsurprisingly).

The machine in question is an AMD A10-7850K; it seems to be using the radeon driver for graphics. I haven’t tried it on other machines yet; that’s next I suppose.

Here’s what I get when I run sudo nixos-rebuild test --flake '.' --show-trace: NixOS infinite recursion error - Pastebin.com It’s too large to paste into Discourse it seems.

Any help, including “here’s some references on how to read that stacktrace” or “here’s a better way to debug your Nix modules” are welcome :stuck_out_tongue: