That’s pretty neat! If you ever port your configs to flakes, you could refactor the let block at the top into a NixOS module where the values there are provided by options, then expose the module as a flake output.
There’s a services.mastodon in NixOS already, but I assume that’s not containerized like your version.
yeah I’m using the service inside of a container, I wanted a separate instance of postgres, redis and others as I was already running few of those on the same host. IMHO the default service definition found in nixpkgs is quite good and can be used easily for something that works out of the box, my setup builds on that and kinda complicates it a bit.
defo interesting how would it look like as a standalone flake to be pulled in separately, might experiment with that :)
for now I’m using it from a flake-based repo that defines multiple hosts and services
That’s pretty neat! If you ever port your configs to flakes, you could refactor the
let
block at the top into a NixOS module where the values there are provided by options, then expose the module as a flake output.There’s a
services.mastodon
in NixOS already, but I assume that’s not containerized like your version.That’s what they’re using:
yeah I’m using the service inside of a container, I wanted a separate instance of postgres, redis and others as I was already running few of those on the same host. IMHO the default service definition found in nixpkgs is quite good and can be used easily for something that works out of the box, my setup builds on that and kinda complicates it a bit.
defo interesting how would it look like as a standalone flake to be pulled in separately, might experiment with that :) for now I’m using it from a flake-based repo that defines multiple hosts and services