[BUG] nix flake check fails: stack overflow in module system evaluation #2

Open
opened 2026-05-13 16:03:25 -04:00 by canary-admin · 0 comments
Contributor

Problem

nix flake check --no-build fails with a stack overflow:

error: stack overflow; max-call-depth exceeded
at «github:nixos/nixpkgs/.../lib/trivial.nix:1108:7» (builtins.functionArgs)

Individual .nix files parse cleanly with nix-instantiate --parse. A full nixos-rebuild switch has not been tested yet — this may work differently.

What works

  • nix-instantiate --parse on all individual .nix files — all pass
  • nix flake metadata — succeeds

Suspected causes (not yet verified)

  1. stylix.cursormodules/core/stylix.nix sets cursor.package = pkgs.bibata-cursors. If bibata-cursors is not in nixos-unstable or has a broken derivation, could trigger deep evaluation loops.

  2. noctalia-shell.nixosModules.default — may have a recursion issue with the current NixOS module structure.

  3. home-manager.users with complex multi-source imports — imports both noctalia-shell.homeManagerModules.default and lazyvim.homeManagerModules.default alongside NixOS modules.

  4. dconf.settings with empty-string overrides — GNOME dconf block uses close = [ "" ]; for disabled shortcuts.

  5. programs.hyprland.settings.bind — the Hyprland bind list may have an evaluation issue.

Errors already fixed

  • lib.stylix.withMouseCursor / lib.stylix.withPolarity — removed (not real stylix options)
  • Duplicate bt alias in shells.nix — fixed (second changed to blu)
  • services.displayManager.dms-greeter — removed (not in nixpkgs)
  • // ── comment syntax — fixed (changed to # ──)

Test to run

cd ~/j7os
git pull toyoko main
sudo nixos-rebuild switch --flake .#toyoko 2>&1 | tee /tmp/rebuild.log

Status

Open — needs rebuild test on Toyoko to isolate which cause.

## Problem `nix flake check --no-build` fails with a stack overflow: ``` error: stack overflow; max-call-depth exceeded at «github:nixos/nixpkgs/.../lib/trivial.nix:1108:7» (builtins.functionArgs) ``` Individual `.nix` files parse cleanly with `nix-instantiate --parse`. A full `nixos-rebuild switch` has not been tested yet — this may work differently. ## What works - `nix-instantiate --parse` on all individual .nix files — all pass - `nix flake metadata` — succeeds ## Suspected causes (not yet verified) 1. **`stylix.cursor`** — `modules/core/stylix.nix` sets `cursor.package = pkgs.bibata-cursors`. If bibata-cursors is not in nixos-unstable or has a broken derivation, could trigger deep evaluation loops. 2. **`noctalia-shell.nixosModules.default`** — may have a recursion issue with the current NixOS module structure. 3. **`home-manager.users` with complex multi-source imports** — imports both `noctalia-shell.homeManagerModules.default` and `lazyvim.homeManagerModules.default` alongside NixOS modules. 4. **`dconf.settings` with empty-string overrides** — GNOME dconf block uses `close = [ "" ];` for disabled shortcuts. 5. **`programs.hyprland.settings.bind`** — the Hyprland bind list may have an evaluation issue. ## Errors already fixed - `lib.stylix.withMouseCursor` / `lib.stylix.withPolarity` — removed (not real stylix options) - Duplicate `bt` alias in `shells.nix` — fixed (second changed to `blu`) - `services.displayManager.dms-greeter` — removed (not in nixpkgs) - `// ──` comment syntax — fixed (changed to `# ──`) ## Test to run ```bash cd ~/j7os git pull toyoko main sudo nixos-rebuild switch --flake .#toyoko 2>&1 | tee /tmp/rebuild.log ``` ## Status Open — needs rebuild test on Toyoko to isolate which cause.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
j7/toyoko-j7os#2
No description provided.