How to use service definitions from unstable channel?

I’m aware of how to easily get a package from unstable channel:

  unstable = import <nixos-unstable> { };
in { =;

As suggested by this post:

But how do I do the same thing for a service definition?
For example, I’ve submitted a PR for syncthing service:

But how can I now use that one service configuration while still using nixos-21.05 channel for everything else?


Ah, lovely, thank you!

For future searchers:

On my system currently based on release-23.05, in which I pass inputs.nixpkgs-unstable to my configuration via specialArgs = {inherit inputs;}; and have an overlay that provides pkgs.unstable, I was unable to import an unstable service as hoped with:

{pkgs, ...}: {
    imports = [

due to an infinite recursion error. Thankfully the following worked fine:

{pkgs, ...} @ args: {
    imports = [