How to enable an unstable service?

Hello,

I want to try and use ollama to run some models with the webui.
I am running 24.05 and open-webui is not packaged there.
I do not wish to move my whole system to unstable just for one package.

I could do it using podman but I’d prefer to do it without containers – that’s why I use nixos.
On this forum there are tutorials on how to install unstable packages, but not how to enable unstable services.
Is it possible?
If so, can someone help me?

Here’s my current (not working) conifg:

{ config, ... }:

{
  services = {
    ollama = { enable = true;
    
    };
    open-webui = { enable = true;
    
    };
  };
}

There are ways to make it work but they’re rather fragile. There’s a thing you can set that prevents the import of the module and then you can import the module file from an unstable nixpkgs checkout.

The best solution in cases like this is usually to backport the addition of open-webui to 24.05. Pure additions without breaking changes such as these are okay to backport and if you want this to exist, it’s like that others want it too.

Feel free to shoot a PR against Nixpkgs where you cherry-pick the commits onto release-24.05.