First of all, I'm completely new to Nix and I have no idea what I'm doing. I would like to use it initially as a more general purpose replacement of conda environments for my AI-development workflow. To begin with, I'd like to install nix package manager at my work server where I don't have root access. I tried
sh <(curl -L https://nixos.org/nix/install) --no-daemon
however it tries to create /nix which I cannot do without sudo. I searched everywhere, but I don't seem to find a way to circumvent this.
Thanks!
10 Comments
ck_@discuss.tchncs.de · 4 pts · 3y
suspectum@lemmy.ml · 1 pts · 3y
Thanks, this explains it. I'm trying to set up nix-portable now, but it's quite confusing. I downloaded
nix-portablebinary which is a self-extracting archive that silently unpacked a bunch of files to~/.nix-portable:It seems I was meant to run it like so
./nix-portable nix-shellbut this does nothing. On my local machine running OpenSUSE Tumbleweed it exists immediately, whereas on my work HPC server it gets stuck.ck_@discuss.tchncs.de · 1 pts · 3y
suspectum@lemmy.ml · 1 pts · 3y
That's all right, thanks! It seems that it does do something indeed, I had to run with debug information and it was simply taking a long time to configure itself
The only issue is I downloaded a binary package which is dated early 2022 and it uses nix 2.5.1. I need to figure out how to force it to use the latest version of nix.
suspectum@lemmy.ml · 1 pts · 3y
baduhai@sopuli.xyz · 3 pts · 3y
You may wanna have a look at nix-portable if you don't have root access.
amiuhle@feddit.de · 1 pts · 3y
https://nixos.org/download.html#nix-install-linux
suspectum@lemmy.ml · 1 pts · 3y
Thanks! I do run it indeed as a user. I don't have a sudo access on this server so I would like to do a completely portable installation. I downloaded a portable binary for nix https://releases.nixos.org/?prefix=nix/nix-2.16.1/ and unpacked it on a file system, however when running nix it thinks that nix store is at
/nix/store:So far I wasn't able to configure a different location for nix store: I created
~/.config/nix/nix.confand put this line insidenix.storeDir = /work/apps/nix/storebut it couldn't pick up the custom store location.