Skip to content

Ignores watch_file and watch_dir from direnv #157

@yajo

Description

@yajo

Describe the bug

Lorri doesn't find the correct files to watch, and I have no way to force it to reload.

To Reproduce
Steps to reproduce the behavior:

I have a Devshell+Blueprint-based flake where the devshell depends on various files, as per their standard.

Lorri seems to fail to find what files to watch.

I added some of them to the .envrc, which now looks like this:

dotenv_if_exists .data/credentials.env
watch_dir devshells modules/devshell

if type -P lorri &>/dev/null; then
    eval "$(lorri direnv --flake ${DIRENV_USE_FLAKE_ARGS:-.})"
else
    echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
    use flake ${DIRENV_USE_FLAKE_ARGS:-.} --impure --accept-flake-config
fi

Expected behavior

Lorri should respect the watch_dir and watch_file directives expressed in .envrc.

In any case, Lorri should provide a command to force reloading the devshell. Something like lorri reload. Or, even better, force reloading when I execute direnv reload.

Metadata

$ lorri info
Project Shell File: /home/yajo/prodevel/example/flake.nix
Project Garbage Collector Root: /home/yajo/.cache/lorri/gc_roots/671ed3f4d2327747ed356a8f73dd0ad0/gc_root/shell_gc_root

General:
Lorri User GC Root Dir: /home/yajo/.cache/lorri/gc_roots
Lorri Daemon Socket: /run/user/1000/lorri/daemon.socket
Lorri Daemon Status: `lorri daemon` is running
$ uname -a
Linux iceland 6.15.6-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980 x86_64 GNU/Linux

Additional context

@moduon MT-10900

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