From 15f6a71125e24092a76bac9406bc1d75611831b9 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 17 Feb 2025 09:28:56 +0100 Subject: [PATCH] ns --- users/pbsds/home/profiles/bashrc.d/nix-shell.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh index d5b7503..d36bf5f 100644 --- a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh +++ b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh @@ -4,7 +4,13 @@ function ns() { args+=(nixpkgs#"$pkg") done >&2 echo + exec nix shell "${args[@]}" - local tmp=$(nix --extra-experimental-features "nix-command flakes" shell "${args[@]}" -c sh -c 'echo $PATH') + local tmp=$( + export NIXPKGS_ALLOW_BROKEN + export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM + export NIXPKGS_ALLOW_UNFREE + export NIXPKGS_ALLOW_INSECURE + nix --extra-experimental-features "nix-command flakes" shell --impure "${args[@]}" -c sh -c 'echo $PATH' + ) test $? -eq 0 && -n "$tmp" || return 1 export PATH="$tmp" }