From 3c95151c88920b75f4c0688b635d7cf1c19eb844 Mon Sep 17 00:00:00 2001 From: Julian Stiller Date: Fri, 23 May 2025 21:22:56 +0200 Subject: [PATCH] feat: add direnv integration --- flake.nix | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 5038ab5..d42b781 100644 --- a/flake.nix +++ b/flake.nix @@ -21,10 +21,11 @@ imagePackages = pkgs: with pkgs; [ bashInteractive + bats cacert coreutils curl - podman + direnv findutils gawk gitFull @@ -33,20 +34,20 @@ gnutar gzip jq + lixPackageSets.latest.lix + makeWrapper nodejs - openssl + nvd openssh + openssl + podman + reuse rsync + shellcheck + sops sudo wget xz - makeWrapper - bats - shellcheck - reuse - lix - sops - nvd ]; containerLambda = name: tag: pkgs': @@ -192,6 +193,14 @@ "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; }) + + (writeTextFile { + name = "bashrc"; + destination = "/etc/bashrc"; + text = builtins.concatStringsSep "\n" [ + "eval \"$(${pkgs.lib.getExe direnv} hook bash)\"" + ]; + }) ]; extraCommands = builtins.concatStringsSep "\n" [