Preferred way to install Nix packages?

What is the preferred way to get Nix packages working on Bluefin? I believe the Determinate Systems installer works, but I wonder if there’s another approach I should consider. Is it pre-included in any of the ublue images that I’ve missed? ( I see that brew is pre-included… )

I used determinate systems installer, then setup fleek for a bit easier setup, might decide to eject fleek later on. It will be nice if the justfile contains a prebuild setup of nix that can setup these things at once.

2 Likes

I got round to attempting to use the Determinate Systems installer today, but unfortunately it wasn’t 100% successful for me. I think most of the installation is there, but hooks into my shell weren’t configured properly.

I created an item on their issue tracker: Installer emits a warning when installing on Bluefin, and doesn’t configure shell hooks #889

Sharing here incase anyone from the Bluefin side has any insight, or runs into the same problem.

1 Like

(Silverblue user)
As far as I’ve seen, the Determinate Systems Installer has been the only straightforward way to have a Nix setup on an OSTree system.

It would be nice to have official support, but I don’t imagine there’s enough demand from the Bluefin userbase. Just saw that support was removed due to SELinux issues.

Although, it may be more on Nix to have OSTree supported in their official installer.

Nix install using determinate systems works still flawless for me and my current nix setup is still fully operational.

I’m following this thread with interest. How do you install the determinate platform? Do you install the nix package manager on the host in your home directory? Or do you install it into a distrobox? Or something else?

I haven’t used the nix package manager before, but I’m curious about it.

Just do in your terminal:

curl --proto '=https' --tlsv1.2 -sSf -L \
  https://install.determinate.systems/nix | sh -s -- install

it should work.

Thanks. In which directory are the packages installed?

In the /nix/store. If you are not familiar with Nix, I’d highly recommend to check https://nix.dev

Which means that it modifies the directory tree at file system root. This is fine from a technical perspective, but I wonder if I could choose another location, because Bluefin has a very clean / directory. Do you think there will be any problems if I move /nix/store/ to /var/local/nix/store and create a symlink /nix -> /var/local/nix? Or is there some other way to specify an installation directory?

Yes, you can specify a bunch of options.
Please check the repo GitHub - DeterminateSystems/nix-installer: Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs. and open an issue if necessary.

I just replied to you saying what I did and, for my use case, it works. All the nix commands works, flakes, etc.
I just copy pasted (of course verifying first) the thing into my terminal.

Now if you are worried about other things, you should maybe use nix in a distrobox or find other solutions.

1 Like