I have tried installing Nix package manager on Ubuntu for a lonng time without success for the testnet setup, but I finally succeed by accident a day or two ago, by accidentally installing Nix on Ubuntu using the mainnet instructions for Nix…it was quite easy, just a few things had to be changed for it to work.
I’ve also installed a pure NixOS to see what the operating system is like and how it’s package manager works on a full NixOS system.
The easiest install has been building the nodes from source using Ubuntu.
Anyway, the install IOHK recommends I believe is the hybrid install, Ubuntu running with Nix package manager for installing the node: core and relays, except there is a possible problem:
Ubuntu comes natively with its own package manager, so one package manager likely does not know what the other package manager is doing, so for this hybrid install I did a minimal Ubuntu install then installed as many packages that I’m used to using using the Nix package manager…and when there was a package I couldn’t find under Nix, but felt that I needed, I would use Ubuntu’s apt-get to install it.
So I tried to leave apt-get alone as much as possible and just use NixOS.
One question or concern I have is what happens if I install a package via apt-get that uses dependencies for some package I’ve already installed via Nix package manager and it updates that dependency? How will Nix react to that? Will it lose the symlink to the new dependency because it didn’t install it? And similarly what happens in the other direction, if you install a package via apt-get, then mess around with NixOS package which uses one or more of these dependencies and then go back to upgrading this package using apt-get. How will either Nix pkg manager or apt-get react to this? Will it break things?
One huge benefit of this hybrid install is that with a handful of commands you have a full node up and running. Nix will handle the installation almost entirely. The big downside is that it takes from over 2 to 3 hours for Nix to build the node; whereas on an install from Ubuntu, you’re looking at 20 to 30 minutes on my laptop to compile the node.
So, being that the hybrid install might have issue, I’m interested in the last installation method if possible.
Just using pure NixOS to run a node. Since it can already build a node, why not go all the way and just use NixOS to run a node? One major downside I see to this is that if such an install is possible, I’m not aware (at least for AWS) if such a custom instance can be run in mainstream cloud service like AWS, GCP, etc.
The source code install using Ubuntu is easy, straightforward, and fast! And if you’re concerned about fudging up future upgrades and installs you can take a snapshot of important files on your drive regularly using timeshift package and back it up to an external drive if you wish, so you can recreate any earlier working node when the need arises. So, I see this set up as easy, fast practical, and fool proof to a large extent.
Anyway, if anyone has thoughts on any of these installs, particularly the full NixOS one, I would be interested to hear your ideas or experiments that you ran. Thanks.