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

Infinite recursion encountered #561

Closed
kay-mw opened this issue Sep 19, 2024 · 4 comments
Closed

Infinite recursion encountered #561

kay-mw opened this issue Sep 19, 2024 · 4 comments
Labels
bug Something isn't working properly

Comments

@kay-mw
Copy link

kay-mw commented Sep 19, 2024

I recently updated my flake inputs and encountered an infinite recursion error when attempting to rebuild my system. After some troubleshooting, I found that removing the NixOS stylix module from my config fixed the error. My home manager stylix config seems to be fine.

I am not sure what is responsible, but I have tried the following troubleshooting steps:

  • Reverting to/trying various older stylix commits (including the commit my flake was previously on).
  • Trying a basic version of my stylix config, with just the required options.
  • Commenting out specific parts of my config to see if any specific option was responsible.
  • Switching to different branches of nixpkgs (unstable/master/23.05).
  • Commenting out other parts of my overall NixOS config to see if some conflict was responsible (I didn't do this step super comprehensively, however).
  • Misc. things like trying out a different wallpaper image and switching to a different base16 colorscheme

None of these steps were successful. Below is my NixOS stylix config and the full trace.

/modules/nix/stylix/default.nix
{ pkgs, ... }:

{
  stylix = {
    enable = true;
    autoEnable = false;
    image = ./equivalent_exchange.jpeg;
    polarity = "dark";
    imageScalingMode = "fit";
    base16Scheme = "${pkgs.base16-schemes}/share/themes/kanagawa.yaml";
    homeManagerIntegration.followSystem = true;

    fonts = {
      sizes = {
        applications = 9;
        terminal = 11;
      };
      monospace = {
        package = pkgs.meslo-lgs-nf;
        name = "MesloLGS NF Regular";
      };
    };

    cursor = {
      name = "Bibata-Modern-Classic";
      package = pkgs.bibata-cursors;
      size = 20;
    };

    targets = {
      chromium.enable = true;
      gnome.enable = true;
      gtk.enable = true;
    };
  };
}

Trace: https://gist.github.com/kay-mw/acc5e6751abf18b6cc3eff5e1385bd4b

@trueNAHO trueNAHO added the bug Something isn't working properly label Sep 19, 2024
@trueNAHO
Copy link
Collaborator

trueNAHO commented Sep 19, 2024

    autoEnable = false;

Try setting autoEnable to its default value (true).

Maybe this is related to #419.

@kay-mw
Copy link
Author

kay-mw commented Sep 19, 2024

    autoEnable = false;

Try setting autoEnable to its default value (true).

Maybe this is related to #419.

Just gave that a go, unfortunately I am still getting the same infinite recursion error.

@heyimnova
Copy link

I ran into that same infinite recursion error. I found that holding nixvim back on an older version prevents it. Are you using also nixvim and could it be conflicting here?

@kay-mw
Copy link
Author

kay-mw commented Sep 22, 2024

I ran into that same infinite recursion error. I found that holding nixvim back on an older version prevents it. Are you using also nixvim and could it be conflicting here?

Thank you! I do use nixvim, and indeed reverting to a previous commit fixed the infinite recursion issue. Specifically, it seems that this specific commit is where the error begins, which makes sense as it does mention infinite recursion as a potential problem across the commit description and code comments.

My nix proficiency is far too low to understand why this commit leads to an infinite recursion, specifically when you have a stylix NixOS configuration enabled (I tried forking nixvim to figure it out, but didn't really get anywhere). I'll close this issue for now as it seems like more of a nixvim issue and than a stylix issue, but I very well may be wrong so feel free to re-open it if that's the case!

@kay-mw kay-mw closed this as completed Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

3 participants