GithubHelp home page GithubHelp logo

Infinite recursion encountered about stylix HOT 9 CLOSED

danth avatar danth commented on August 26, 2024
Infinite recursion encountered

from stylix.

Comments (9)

robertodr avatar robertodr commented on August 26, 2024 1

I usually use nixos-rebuild: sudo nixos-rebuild --flake .#captain-easychord build

from stylix.

danth avatar danth commented on August 26, 2024 1

do you think it would be possible to theme gnome without it ?

Once logged in, yes, but I couldn't find any other way to theme GDM as it doesn't load extensions.

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

I'm trying to reproduce your problem, how should I build your config ? I've tried a nix flake show but I get an error when evaluatiing checks.

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

Ok so after some experimentation, there are two things that both cause infinite recursion, but I don't yet know why:

  • In stylix/nixos/palette.nix, setting stylix/palette.html (that one actually works)
  • In modules/gnome/nixos.nix, setting the overlay

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

In modules/gnome/nixos.nix, even setting nixpkgs.overlays to [] cause the infinite recursion, but setting it from stylix/nixos/default.nix does not cause any trouble. So it might be something linked to the interaction of nixpkgs.overlays and mkIf. However, I didn't encounter this problem on my config, it probably is linked to something digga is doing.

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

Ok so my hypothesis is that digga use the value of nixpkgs.overlays and nixpkgs.pkgs to build the lib argument it gives to the modules (I don't have the time right now to dive into the implementation details of digga to make sure of that). That means that anything using lib needs first to evaluate config.nixpkgs.overlays, which in our case need to evaluate lib.mkIf, creating the infinite recursion.
That would explain why I haven't encountered this bug, since my lib argument comes from outside the module system.
I am not sure how to fix it however, I would have to think a bit more about it.

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

I confirmed that if the mkIf comes from outside, there is no more infinite recursion, but I'm not sure how to do that properly.
Maybe it would be best if we simply avoided setting nixpkgs.overlays, since anyway the user may discard it by passing pkgs as an argument to nixosSystem. @danth do you think it would be possible to theme gnome without it ?

from stylix.

robertodr avatar robertodr commented on August 26, 2024

Thank you so much for digging through this! Would opening an issue on the digga repository help?

from stylix.

dwarfmaster avatar dwarfmaster commented on August 26, 2024

Maybe that's the best thing to do indeed. I will create a FAQ here in case someone else encounters the same problems, because it is not specific to digga.

from stylix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.