Closed chris-martin closed 6 years ago
Any update?
Not from me, I've been spending all my time shooting the shit on Mastodon.
It's on my immediate todo-list. Probably this weekend.
As it's a rails app and I've already done lots of rails nixos modules, it should be easy. If anyone wants to beat me, just look at the gitlab or frab module.
This would be really neat! How's it coming along?
Unfortunately it's little bit more complicated because it needs lots of NodeJS dependencies for the frontend stuff and node2nix fails to produce working nix expressions. Also, some gems need overrides because they won't build either.
Ah that sucks. Let me know if there's anything I can do to help, but i'm just a newbie to NixOS really.
Is it feasible to half-ass the JS/Ruby dependencies by just pulling them at runtime when the server starts?
Just tried running node2nix 1.2.0 on Mastodon master.
error: ‘buildNodePackage’ at /home/chris/code/mastodon/node-env.nix:198:22 called without required argument ‘version’, at /home/chris/code/mastodon/node-packages.nix:16677:13
Line 16677. Wow. That seems like... a lot of output.
Where are we on this? Can I help?
Is there an update to this? I'd be awesome to deploy mastodon on Nix!
I think I'm doing some progress on this. I can't reproduce the failing node2nix
anymore and I managed to build the ruby environment (took some overrides as @fpletz suggested).
My progress is currently here.
I never really tested running the server yet, as there is quite a lot to do before that works. But I think, that the dependencies are almost in place.
Biggest pain point atm is the Node environment. I basically copied the approach from base-16-builder
. That builds, but what bothers me is
pkgs
node2nix
.nix-build -A pkgs.mastodon
.Would be nice if someone with more NodeJS domain knowledge would look onto that.
Do you know what would be required to test that using VM tests?
I was thinking of having 2 mastodon instances and maybe using API-clients to post and fetch messages?
I never looked into NixOS VM tests, but iirc Mastodon would be well suited for that. One could test federation and client-server-communication as you described.
This would definitely depend on a working service expression. Additionally there needs to be a way to create users from the command line (I'm sure there is) and a Mastodon CLI client (there are some).
I made the mistake to take a break in the development. In that time, Nixpkgs moved considerably as well as Mastodon. The package doesn't even build anymore.
This might be too complex for my current state of knowledge of Ruby and Node. I give up.
I rebased my progress ontop of nixos-unstable
and added a minor fix. Maybe someone else has luck with it:
https://github.com/erictapen/nixpkgs/tree/mastodon
If I ever try to package a Fediverse app again, I may try Pleroma, which seems to be more leightweight.
Can we close this until someone opens a PR? Seems to have lost momentum.
I'd think it would make sense to close it. Haven't heard of any progress in a while.
@chris-martin Can we close this until someone opens a PR?
Sounds reasonable to me.
I have an instance runnng on https://social.pbb.lc The module I wrote is available at https://git.pbb.lc/petabyteboy/nixfiles/src/branch/master/pkgs/mastodon/default.nix https://git.pbb.lc/petabyteboy/nixfiles/src/branch/master/modules/mastodon.nix It will need a few changes for nixpkgs, I will open a PR soon.
@petabyteboy any plans to open a PR? I have plans to deploy a mastadon server via nix. I could help get this started if you would like
Yeah please do this!
there is a PR at #60788
There's a lot of talk on Mastodon about wanting more people to run servers. The current recommended deploy environment is Docker. It'd be nice if we could provide NixOS support. I've already seen several of y'all on Mastodon, so we ought to be able to get this done :smiley: I may work on this myself if I find time.