From 96a2c62e947f66a7d9c8c1501ba56c1ea60f4a41 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 5 Sep 2023 16:20:20 +0000 Subject: [PATCH] home: direnv: allow insecure 'use pkgs' --- home/direnv/lib/nix.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/direnv/lib/nix.sh b/home/direnv/lib/nix.sh index ec8fa88..de86dac 100644 --- a/home/direnv/lib/nix.sh +++ b/home/direnv/lib/nix.sh @@ -23,6 +23,11 @@ use_pkgs() { args+=(--impure) shift ;; + -s|--insecure) + args+=(--impure) + export NIXPKGS_ALLOW_INSECURE=1 + shift + ;; -u|--unfree) args+=(--impure) export NIXPKGS_ALLOW_UNFREE=1 @@ -53,5 +58,6 @@ use_pkgs() { direnv_load nix shell "${args[@]}" "${packages[@]}" --command "$direnv" dump # Clean-up after ourselves (assumes the user does not set them before us) + unset NIXPKGS_ALLOW_INSECURE unset NIXPKGS_ALLOW_UNFREE }