From 8f2bc1283df2eb2182ee0bb295aff081049fe443 Mon Sep 17 00:00:00 2001 From: Eternahl Date: Mon, 16 Sep 2024 12:41:38 +0200 Subject: [PATCH] add nix binaries sourcing for nushell on multi-user install --- scripts/install-multi-user.sh | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh index a487d459f..e27e835f7 100644 --- a/scripts/install-multi-user.sh +++ b/scripts/install-multi-user.sh @@ -50,6 +50,17 @@ readonly PROFILE_FISH_PREFIXES=( ) readonly PROFILE_NIX_FILE_FISH="$NIX_ROOT/var/nix/profiles/default/etc/profile.d/nix-daemon.fish" +# Nu has different syntax than zsh/bash, treat it separate +readonly PROFILE_NU_SUFFIX="nix.nu" +readonly PROFILE_NU_PREFIXES=( + # each of these are common values of $nu.vendor-autoload-dirs, + # under which Fish will look for a file named + # $PROFILE_NU_SUFFIX. + "/usr/share/nushell/vendor/autoload" + "/usr/local/share/nushell/vendor/autoload" +) +readonly PROFILE_NIX_FILE_NU="$NIX_ROOT/var/nix/profiles/default/etc/profile.d/nix-daemon.nu" + readonly NIX_INSTALLED_NIX="@nix@" readonly NIX_INSTALLED_CACERT="@cacert@" #readonly NIX_INSTALLED_NIX="/nix/store/j8dbv5w6jl34caywh2ygdy88knx1mdf7-nix-2.3.6" @@ -876,6 +887,17 @@ end EOF } +# Nu has differing syntax +nu_source_lines() { + cat <