From 4dd93c367289e8ee78987b378eca7bbb053db29e Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Mon, 21 Oct 2024 18:27:52 +0200 Subject: [PATCH] chore: add lorri to prevent direnv from blocking, closes #147 --- .envrc | 11 ++++++++++- flake.nix | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 0f94eed..a7a9086 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,11 @@ +#!/usr/bin/env bash +# the shebang is ignored, but nice for editors + # shellcheck shell=bash -use flake +if type -P lorri &>/dev/null; then + eval "$(lorri direnv --flake .)" +else + echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' + use flake +fi + diff --git a/flake.nix b/flake.nix index a57fe5a..71c3347 100644 --- a/flake.nix +++ b/flake.nix @@ -93,6 +93,9 @@ devShells = forEachSystem' ({ system, pkgs, ... }: { default = pkgs.mkShell { packages = [ + pkgs.direnv + pkgs.lorri + inputs.agenix.packages.${system}.agenix pkgs.opentofu