# Anyone using Nix packages

**URL:** <https://deeptalk.lambda.ai/t/anyone-using-nix-packages/4502>\
**Category:** Technical Help\
**Created:** [February 8, 2025, 1:26am UTC](https://deeptalk.lambda.ai/t/anyone-using-nix-packages/4502 "2025-02-08T01:26:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![walter](https://avatars.discourse-cdn.com/v4/letter/w/85e7bf/32.png) [@walter](https://deeptalk.lambda.ai/u/walter)\
**Post date:** [February 8, 2025, 2:39am UTC](https://deeptalk.lambda.ai/t/anyone-using-nix-packages/4502/2 "2025-02-08T02:39:18Z")

</div>

Did a bit of hacking…

You need to bootstrap your login shell so that you can run your own bashrc (Explained in another post)

In this bashrc add the following:

```auto
##########################
# Reseat HOME to the location of this .bashrc
#

# 1. Get the real path of the current .bashrc

REAL_BASHRC="$(readlink -f "${BASH_SOURCE[0]}")"
REAL_HOME="$(dirname "$REAL_BASHRC")"

# 2. Infer persitent mount point using LambdaLabi's mountingconvention, ie. "${HOME}/${persitent_mount_name}"

MOUNT_POINT="${REAL_BASHRC%/home/*}"

if [["$MOUNT_POINT" == "$REAL_BASHRC"]]; then
    echo "Error: Could not find mount point in path: $REAL_BASHRC"
    return 1
fi

# 3. Check if mount point is writable

if ! [[-r "$MOUNT_POINT" && -w "$MOUNT_POINT"]]; then
    echo "Error: \"${MOUNT_POINT}\" point not rw"
    return 2
fi

# 4. Store these before changing HOME

export SYSTEM_HOME="$HOME"
export ROOT="$MOUNT_POINT"
export HOME="$REAL_HOME"

# 5. Change to actual home directory

cd "$HOME"

################# Other stuff

##########################
# Nix
#

export NIX_ROOT="${ROOT}/nix"
export NIX_PROFILE="${HOME}/.nix-profile"

```

Then login again and install of Nix manually…

```auto
sh <(curl -L https://nixos.org/nix/install) --no-daemon

```

Login again. Afterwards you should be able to do Nix stuff (RTM), eg.

```auto
nix-shell -p go

```

Refer to [https://nixos.org/](https://nixos.org/) for more information

---

_[View the full topic](https://deeptalk.lambda.ai/t/anyone-using-nix-packages/4502)._
