After updating the flake, my configuration refuses to evaluate with the “max-call-depth exceeded” error message.
I tracked the issue down to two scripts that I use for changing wallpapers being inserted into hyprland’s ‘exec-once’ list. When either of them is inserted, the evaluation fails. I have no idea why this would be causing issues.
This isn’t even the first time I’m encountering stack overflow or infinite recursion errors, so it’s not out of the question I’m just doing the whole thing wrong.
Any ideas on how to deal with this/any tips for avoiding it in the future?
nix flake check is enough. or nixos-rebuild build –flake . or whatever else evaluates the thing (for the leturlaptop2 configuration.
error:
… while checking flake output 'nixosConfigurations'
at /nix/store/fgwdxrg12xg0dj7q4fgwb46fqhkfslc8-source/flake.nix:83:5:
82| miscFiles = customUtils.importPackagesRecursive ./miscFiles;
83| nixosConfigurations = {
| ^
84| # leturlaptop =
… while checking the NixOS configuration 'nixosConfigurations.leturlaptop2'
at /nix/store/fgwdxrg12xg0dj7q4fgwb46fqhkfslc8-source/flake.nix:100:7:
99| # };
100| leturlaptop2 = let
| ^
101| system = "x86_64-linux";
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/12azrzlywd7jmsg1q9n4dpqqgb33p2wl-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `warnings':
… while evaluating definitions from `/nix/store/12azrzlywd7jmsg1q9n4dpqqgb33p2wl-source/nixos/modules/system/boot/systemd.nix':
… while evaluating the option `systemd.services.home-manager-letur.serviceConfig':
… while evaluating definitions from `/nix/store/96y4pqrhd1w3svfca4sgpsbmhh2n9jlk-source/nixos':
… while evaluating the option `home-manager.users.letur.home.file."/home/letur/.config/hypr/hyprland.conf".source':
… while evaluating definitions from `/nix/store/96y4pqrhd1w3svfca4sgpsbmhh2n9jlk-source/modules/files.nix':
… while evaluating the option `home-manager.users.letur.home.file."/home/letur/.config/hypr/hyprland.conf".text':
… while evaluating definitions from `/nix/store/96y4pqrhd1w3svfca4sgpsbmhh2n9jlk-source/modules/misc/xdg.nix':
… while evaluating the option `home-manager.users.letur.xdg.configFile."hypr/hyprland.conf".text':
… while evaluating definitions from `/nix/store/96y4pqrhd1w3svfca4sgpsbmhh2n9jlk-source/modules/services/window-managers/hyprland.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: stack overflow; max-call-depth exceeded
at /nix/store/12azrzlywd7jmsg1q9n4dpqqgb33p2wl-source/lib/strings.nix:803:13:
802| # to strings and comparing. This was surprising and confusing.
803| warnIf (isPath pref)
| ^
804| ''
And I got it to evaluate. Looks like hyprland’s exec-once just can’t deal with a path like it used to before the update, it explicitly has to be a string, I have no idea why it changed, and even less why it errors with a stack overflow out of all things.
Anyway, I’ll test it out and see if everything works the way it should and mark as solved if it does.