Hello, I’m very new to NixOs and desperately trying to get a Github repository running. It is a project called THERMOS, a software for modelling distributed heating networks. It was funded by an EU project and is now open source.
While I’m usually working with Ubuntu, I thougt NixOs would be the better option for this time. So, I installed NixOS 23.11 and the nix packages for OpendJDK and nixos_unstable.
In the source code of this expression mentioned above I found a line nixops create -d pg-server pg-server.nix
I tried to run this, but I get just some error messages like pg-server was an unknown argument.
I would be very grateful for any advice or support.
sure, let’s take some time to work through your challenges
you said you want to install this on your local machine - does that mean you have NixOS installed on your local machine? or do you want to run this in some sort of container on your local machine?
please clarify what OS you are running on your local machine already, specifically what OS you want to be running on your local machine, and whether your goal was to be using containers or not
Hi, thanks for your reply! I’ve installed NixOS 23.11 on a new partition. As I wrote, I use to work with Ubuntu 22.04 LTS.
Using containers (Docker) would be a nice option, but this would require deeper knowledge about NixOS and containers. A dedicated NixOS partition would be the easier way, I thougt.
Hi Aaron, thanks again! I spent yesterday evening with NixOS. I modified configuration.nix according to your post, but it didn’t work.
In the first line of that expression, they mention Virtualbox
# nixops configuration for a postgresql server, deployed into virtualbox
So I installed a VB and loaded the current NixOS iso file. This was pretty easy! Then I opened a nix-shell, pulled the project from Git, pulled Clojure and OpenJDK und ran the Clojure script
clojure -Adev:server:client jar
…but I didn’t succeed. The compilation ran for a few minutes and got stuck every time.
I’m an absolute NixOS noob. Nixos is a different world. Today I learned how to install GIT permanently (net-env -iA nixos.git) and installed OpenJDK and Clojure in the same way. Then I called the clojure script - and it got stuck again…
can you please provide very specific details on how this didn’t work?
i think we should try to simplify your life and avoid NixOps and VirtualBox for now - given that you have recently started with nix i think these additional technologies aren’t worth it for you yet
since you’re working with java inside a virtual machine i will make the assumption that your vm ran out of resources and i will continue to suggest we avoid VirtualBox as well as NixOps for now
don’t worry, we’ll get you sorted let’s focus on your issues with your nixos configuration as mentioned above and go from there
Hi Aaron, yes, you’re right! Let’s try without NixOps and vm. I installed NixOS again, means I have a clean system, plus GIT, OpenJDK and Clojure. Pulled the project from GIT and started to build.
clojure -Adev:server:client dev
The build stopped at the same postion where it had stopped before when running under Ubuntu or on the NixOS-VM. The protocol is huge. If you don’t mind… I will share it on mit GDrive.
Hi! I was looking through this randomly and was wondering if you tried changing the pg-host variable? I suspect that IP is a hard-code value for the virtual machine’s network interface. Since you’re not running it through virtualbox it should probably be localhost (127.0.0.1).
desperately trying to get a Github repository running.
Honestly, as much as I love all things Nix, I’d just use Docker to run postgres for a local dev environment like that. Unless you just want to sink some time into learning Nix and NixOS.