this post was submitted on 26 Jun 2023
5 points (100.0% liked)

Nix / NixOS

1742 readers
3 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I was looking into the prospect of deploying an instance of Lemmy myself. Being an ULTRA nix fanboi (and a Docker-hater), I was immediately struck by how much the process still depends on (and, IMO, is being held hostage by) Docker containers.

Can we (or at least someone more capable and with more free time than I) help the Lemmy community by harnessing the power of nix and flakes to create declarative, reproducible Lemmy scratch-built instance deployment?

I suspect it would be exceptionally easy for some of you out there. If you are a flakes power-user, just think of how much this could help the community (and perhaps awaken a few people to the power of flakes).

ps. if this already exists, please point me in the right direction.

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

Nothing at all. Maybe my suggestion is ignorant (but I don't think it is).

What I am suggesting is a template configuration for instance operators to make getting up and running fool-proof. From what I hear, the nixpkgs module is great but it doesn't help with the more complex parts of spinning up an instance regarding DNS and other aspects of a typical instance's tech stack. If we could share a github repo with a FULL minimum viable product for all of the parts needed to run a real, solid lemmy instance, it would allow instance operators to gain all of the advantages that we currently enjoy using flakes. For example, an instance operator might be able to safely upgrade their entire instance with one command while, from what I observe, it currently takes instance operators a week or more to test and install things in that old, painful non-Nixy way.

[–] [email protected] 2 points 1 year ago

It is possible to deploy a lemmy server via a NixOS option. It's under services.lemmy, see https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=lemmy

You could always try to improve the packaging (there is an issue I had, but a ticket was already open and should be fixed at worst in the next version of lemmy, which was released a few days ago if I'm right)

Of course, everything that make NixOS server hosting will making hosting lemmy with nixos easier, but most of the trouble I had with setting up my server a few years ago was understanding how to configure and run the DNS server on it.

[–] [email protected] 1 points 1 year ago

There is a lemmy nixos module https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=lemmy in nixpkgs which is functional. Or at least almost there in terms of ease of use. Even with experience, it still took me over an hour before I could successfully start my instance.

ofc this doesn't cover the host creation, and other details, I already had a server with NixOS running.