Skip to content

Conversation

@shivaraj-bh
Copy link
Member

@shivaraj-bh shivaraj-bh commented Feb 14, 2025

resolves #354

Init with ollama.

Usage

process-compose app

# Inside perSystem
{
  process-compose.sf-ollama = {
    imports = [ inputs.services-flake.processComposeModules.default ];
    services.ollama.o1.enable = true;
  };
}

And nix run .#sf-ollama to start the service

systemd/launchd user unit/agent

Note: The option services.<service-name> overlaps with existing service definitions in home-manager. I could rename it to avoid conflict, but for now you could use the release-24.11 branch of home-manager that doesn’t yet have ollama.

# In your `homeConfiguration`
{
  imports = [ inputs.services-flake.homeModules.default ];
  services.ollama.o1.enable = true;
}

Lastly, activate your home-manager config...

<Insert home-manager template to test Ollama running via systemd or launchd>

TODO:

  • outputs.{systemd, launchd, process-compose} must share as much configuration as possible (also add sane defaults for systemd and launchd)
  • systemd and launchd tests
  • Documentation

@shivaraj-bh shivaraj-bh changed the title feat: Portable services init feat: Portable services Feb 14, 2025
Copy link

@Eveeifyeve Eveeifyeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of this pr although it would conflict with home-manager. So I would say maybe rename to services-flake.services? Yes it would break compatibility but it would be the best to solve this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Portable services

3 participants