Your title says lemmy instance and in your description you are asking for kbin instance. Which one you truly mean?
Lemmy is already packaged in nixpkgs and its options for NixOS are: https://search.nixos.org/options?channel=unstable&show=services.lemmy.enable&from=0&size=50&sort=relevance&type=packages&query=lemmy
But I do not see kbin packaged yet.
Personally I haven’t used it, but NixOS options are here: https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=security.apparmor