❄️ Installing the nix package manager on SailfishOS

Thanks for the hints. I added a warning about the download size to the post.

As for the Determinante Systems installer I don’t think that it’ll bring much value here (though I haven’t tried). It can’t work around the small root partition problem. And here, we’re using the single-user installation without the daemon and builder users etc. This is ideal for this effectively single-user SailfishOS and also easy to remove. No real need for the new installer’s fancy install receipt to make sure everything can be removed cleanly again. But I’d be happy to hear what your experiences with it are on SailfishOS.

Sadly in my life I had the oportunity to work with nix and nixos and honestly I see literaly zero benefits and more negative problems with it on SailfshOS. One of the biggest is the space requirements, second is the learning curve for newcomers.

Well then, easy solution for you: don’t use nix on SailfishOS. :smiley:

3 Likes

Wait, really? Last time, I tried to build ProtonMail Bridge from source and failed because some dependencies weren’t available on Sailfish.

Hi,

I am interested in this! Did you manage to get ProtonMail Bridge working with Nix?

I did! But something I did with Nix messed up my sytem (bootloop), so I undid it again.

But I had the idea of installing the Nix packagr manager in an LXC container and running Bridge from there which now works perfectly!

Really? :astonished: I wonder how that is possible. At least from my instructions here I don’t see a possibility that could affect base SFOS, let alone causing a boot loop. If you remeber what caused it, I can add it as a warning to the post.

Thanks for the guidance, I feel more confident to try it now.

I will post a tutorial how to setup ProtonMail Bridge on sailfishos.wiki if you are interested

3 Likes

I’m not sure what caused the problem. I first thought it was the systemd-service I created to mount /nix when booting up (because I reboot my device every day). But after I removed it, the problem appeared again. I discovered that it basically gets to the unlock prompt and after you type in the code it doesn’t do anything. It does this two or three times if you reboot and then it boots again normally. I have now removed nix and it hasn’t done this since then. So I assume that nix was somehow the problem? But I really can’t think of anything that nix could do to cause this

1 Like

That would be perfect, thank you in advance! I have no idea how many ProtonMail users there is out here, but the support for it has been missing from SFOS for too long time.

Alternative option for what?? I’m already a ProtonMail Plus subscriber and I already use Bridge on my Laptop and now on my phone

Fine and it is also fine that you share your know-how with a wiki tutorial. Just remember that it such a service require a monthly subscription (or year or multi-years subscription). Nothing bad about that and I like Proton services. However, it always important to consider a open-source alternative.

Why? For the same reason (vendor lock-in) you are struggling with SFOS, for example… :wink:

As far as I can tell, Proton’s services are open source in most parts:

With E-Mails, you basically always have “vendor lock-in” except if you host your own E-Mail-Server, which many of us don’t have the resources or the knowledge for.

1 Like

Here is the tutorial I promised: Using ProtonMail Bridg... | SailfishOS community wiki

6 Likes

Oh did we? Then I’m sorry, I misunderstood your point.

You are right, you can absolutely host your own E-Mail server at a hosting provider. What I meant was really hosting it by yourself (e. g. on an old computer in your basement,…)

Thanks for sharing this @NIS, great that you got it working and a really nice write-up.

2 Likes

Thank you for the instructions! I use my Gemini PDA to be able to leave the work laptop at home on leisure trips, the nix package manager gives a lot more tools for me on the go. For example I was now able to install MySQL and connect to remote databases while I am on a trip just with the Gemini PDA.

The instructions didn’t yet have a way to automatically mount the .nix-store-image under /nix after reboot, but adding following line to the /etc/fstab was enough for auto mount:

/home/defaultuser/.nix-store-image /nix ext4 defaults 0 0

For some reason the installer did not generate .profile file, so any of the nix-* tools were not usable even after terminal reboot. After manually sourcing the configuration shell script everything worked as it should:

source .nix-profile/etc/profile.d/nix.sh

To keep that persistent even after terminal boot, I created /home/defaultuser/.profile with the same line.

Thank you again for making the Gemini PDA even more powerful little pocket computer on the go for me :slight_smile:

4 Likes

I wanted to point out that there have been some significant efforts to address this with the chum work to get QT 5.15 and a significant number of kde libs and apps running via the obs at build.sailfish.org.

That work could be built on to get much more modern packages into chum. The main work requires a bit of study of the way @rinigus and @piggz setup the builds, but even an rpm packaging noob like me was able to make some contributions. Developer Announcement - Qt 5.15 available for app developer testing

Obviously, this is primarily aimed at kde apps, but can be used to support a lot of apps. It’s not just ‘fire and go’ installs, but editing some spec files is certainly a lot less work than building by hand.

That does not detract from the idea of having nixpkgs running on sfos. I’d just like to point out that systematic efforts to have automated builds of more modern apps has been don.

PS. I was an early Nixos user. But, not anymore :slight_smile: