nix-community / lorri

Your project’s nix-env [maintainer=@Profpatsch,@nyarly]
Apache License 2.0
677 stars 24 forks source link

lorri init .envrc: fall back to `use nix` #64

Open Profpatsch opened 3 years ago

Profpatsch commented 3 years ago

A trivial improvement, the default .envrc should check whether lorri is installed and if not fall back to the direnv-native use nix.

SuperSandro2000 commented 3 years ago

Like this?

if has lorri; then
  eval "$(lorri direnv)"
else
  use nix
fi
Profpatsch commented 3 years ago

yeah, with type lorri >/dev/null I guess

SuperSandro2000 commented 3 years ago

yeah, with type lorri >/dev/null I guess

That would need to be type -P lorri &>/dev/null.

chisui commented 2 years ago

Maybe also include a link to lorri in the fallback case?