How do I host a kbin instance on NixOS?

Hello, does anyone know about how to run a kbin instance on NixOS? Will the steps on https://codeberg.org/Kbin/kbin-core/wiki#admin-guide (but replacing the apt installs with adding packages in configuration.nix) just work, or is there a better, more reproducible way?

Thanks.

EDIT: I meant a kbin instance, not lemmy.

pumpkin,

You've probably found it, but in the off chance you haven't, it seems there's an issue on the nixpkgs repo for getting kbin packaged.

baduhai,

You'll probably want to write a derivation for kbin, then write a nixos module that configures a systemd service to manage kbin as a system service.

kotatsuyaki,

There is a NixOS module for Lemmy, and it's usage is documented in the NixOS manual. To quote the minimal example from the manual:

services.lemmy = {
  enable = true;
  settings = {
    hostname = "lemmy.union.rocks";
    database.createLocally = true;
  };
  caddy.enable = true;
}

kotatsuyaki,

I just saw that you're asking for kbin, not lemmy. The steps probably wouldn't work as-is, and the "correct" way is to create a NixOS module for kbin. Some of the configuration steps (e.g. creating the kbin service user, configuring PHP, configuring Nginx, configuring Let's Encrypt etc.) are supported by NixOS modules in nixpkgs. It's also necessary to package kbin itself, and to create systemd services to run it.

Creating a module requires effort, though, and I'd rather use a container to deploy it for simplicity, if it were me.

Klaymore,
@Klaymore@sh.itjust.works avatar

There's actually an entry in the NixOS manual about enabling Lemmy, but it seems a little short. I would also look at the available Lemmy options and try messing around with those if it doesn't work.

There's also a wiki page about it, but from first glance it seems overly complicated and way more than you should need to do. If the other things don't work you can take a look at this, but I don't think you should need it.

eneff, (edited )

Lemmy is packaged already, and you can find configuration options here.

kbin is not packaged yet, thus there are no configuration options for it.

There currently is an open issue requesting it to be packaged here.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • nixos@lemmy.ml
  • DreamBathrooms
  • magazineikmin
  • cubers
  • everett
  • rosin
  • Youngstown
  • ngwrru68w68
  • slotface
  • osvaldo12
  • Durango
  • kavyap
  • InstantRegret
  • tacticalgear
  • khanakhh
  • megavids
  • GTA5RPClips
  • normalnudes
  • thenastyranch
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • tester
  • provamag3
  • cisconetworking
  • anitta
  • JUstTest
  • lostlight
  • All magazines