From 5d7b2b5ea4d4742f74977db53f44066c7565e089 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 8 Feb 2024 06:48:33 +0300 Subject: [PATCH] Nix : Better compat with flakes. --- .config/bash/module/Nix.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/bash/module/Nix.sh b/.config/bash/module/Nix.sh index 652e162..9e4be37 100644 --- a/.config/bash/module/Nix.sh +++ b/.config/bash/module/Nix.sh @@ -43,7 +43,11 @@ function nix_shell() { local target="${1}" [[ "${target}" = "" ]] && target="default" - NIX_SHELL="${target}" nix develop ".#${target}" + if [[ "${target}" = "default" ]]; then + NIX_SHELL="${target}" nix develop + else + NIX_SHELL="${target}" nix develop ".#${target}" + fi } alias shell="nix_shell"