Skip to content

Infinite recursion when migrating my config #16

@Lyndeno

Description

@Lyndeno

I am not sure whether this is a problem with how I originally set up my config, haumea, or a combination of the two. In certain spots, especially when referring to config I get infinite recursion just when migrating a line from my original config to a folder that haumea is loading. Oddly, this recurision is solved by lib.mkForce but it feels hacky.

Some examples:

Just specifying which package vscodium module should use.
Lyndeno/nix-config@4add99c

+ # FIXME: Why do I need mkForce to avoid recursion?
+ package = lib.mkForce pkgs.vscodium;

Referencing config to get the proper kernel.
Lyndeno/nix-config@c98095a

# Haumea file
+  # FIXME: For some reason mkForce is needed to prevent infinite recursion
+  kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;

# Old file
-  boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;

And in this case, not even referencing config, just changing the kernel.
Lyndeno/nix-config#dda0cc2

# FIXME: For some reason mkForce is needed to prevent infinite recursion
 kernelPackages = lib.mkForce pkgs.linuxPackages_rpi4; # Raspberry pies have a hard time booting on the LTS kernel.

In all these cases, the original line worked fine before migrating it to my haumea layout. I am not sure if maybe I am loading the folder in a non-ideal way, or if the way haumea works makes recursion more likely with the way I am configuring my system. The most puzzling cases to me are the ones where I am just changing the kernel package or the vscode package, not something I would expect to cause recursion. I am wondering if anyone has any idea how to fix these errors without resorting to mkForce.

Maybe this is not the right spot to post this problem, but I thought since I am running into this when converting my configs with haumea, maybe someone here could provide valuable insight.

Thank you for the very nice tool! It is allowing me to clean and organize my configs very nicely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions