Skip to content

Direnv hangs (and my whole system slows) when flake inputs update #292

@the-argus

Description

@the-argus

To reproduce:

  • Clone my configuration repo
  • CD into it
  • direnv allow
    This immediately caused the issue for me. Everything freezes when nix gets to [querying source]. I don't think you will actually be able to reproduce it since I have never seen this issue before and it doesn't happen on my PC, only my laptop. I've tried removing all my .direnv/ directories and .cache/direnv and doing nix-collect-garbage -d, to no avail.

The issue

The process (updating a flake as prompted by direnv use flake) will hang. Everything on my computer becomes slow. Opening windows takes 10-20 seconds. My zsh prompt takes 5 seconds to load. Additionally, after closing the window, the problem remains. I've tried looking for a direnv or zsh or nix process and killing it, but there don't seem to be any...

To make matters worse, it's really inconsistent. I cannot figure out when or why it happens, and sometimes the process does finish if I wait long enough (like 10-20 minutes, I think).

Any other ideas on different things I could try to fix the problem? I thought clearing the caches would at least help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions