From d208a5dafbbce72452f93b97d0cd6eae3957acfd Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:17:48 +0200 Subject: [PATCH] Improve nix init --- dot_zshrc.tmpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index cf9fd31..e648d1b 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -200,10 +200,12 @@ fi # Nix # --------------------------------------------------------------------------- -if command nix-env &>/dev/null; then +if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then + . $HOME/.nix-profile/etc/profile.d/nix.sh; + alias nix-update='nix-channel --update && nix-env -u' nix-search() { nix-env -qa --description ".*$1.*" } -fi \ No newline at end of file +fi