Stream: services-flake

Topic: Plan on integrating photoprism based on services-flake


view this post on Zulip corocoton (Jul 09 2024 at 08:43):

Hello,
first of all, thanks for sharing an awesome project !

I'm curious and in the very process of getting a photoprism service running.

Currently I'm using this fine flake of someone, with workarounds not worth detailling, but significantly enough to progress.

So my question ought to be how I would model the mysql setup elaborated back there using services flake ?

Is process-compose the right tool for me then ?

view this post on Zulip Shivaraj B H (Jul 09 2024 at 15:39):

process-compose is useful to manage services that run in foreground and mainly as a replacement for dev containers, to test your projects' integration with external services (during local development and CI). And also, you needn’t have to be on NixOS to run these services.

photoprism is a service that you will most likely host with an init system (like systemd or launchd) that runs in background. This should work nicely once we have https://github.com/juspay/services-flake/issues/239

view this post on Zulip corocoton (Jul 09 2024 at 20:49):

Shivaraj B H schrieb:

process-compose is useful to manage services that run in foreground and mainly as a replacement for dev containers, to test your projects' integration with external services (during local development and CI). And also, you needn’t have to be on NixOS to run these services.

photoprism is a service that you will most likely host with an init system (like systemd or launchd) that runs in background. This should work nicely once we have https://github.com/juspay/services-flake/issues/239

I want to be able to run that on non-NixOS, that the involved services run in foreground is not an obstacle for me, so let's call it an exercise rather than an enhancement of services-flake.

view this post on Zulip Andreas (Jul 10 2024 at 08:14):

I don't know how production-ready that is, but this might be worth looking at: https://github.com/numtide/system-manager

view this post on Zulip Andreas (Jul 10 2024 at 08:15):

Works on any non-NixOS distro as long as it is called Ubuntu they say :grinning_face_with_smiling_eyes:

view this post on Zulip corocoton (Jul 10 2024 at 08:21):

Andreas schrieb:

I don't know how production-ready that is, but this might be worth looking at: https://github.com/numtide/system-manager

Thanks for that link, I consider adding that to my exercise list than. That's actually systemd --user, why not ?
I have at least one use in the flake I use for my systems where that might work pretty well (using systemd-tmpfiles on I dare say Archlinux).

view this post on Zulip Andreas (Jul 10 2024 at 08:36):

That's actually systemd --user

Is it? Where did you get that from?

view this post on Zulip corocoton (Jul 10 2024 at 08:40):

Andreas schrieb:

That's actually systemd --user

Is it? Where did you get that from?

Let's say I just very much hoped so from a glance at their https://github.com/numtide/system-manager/blob/4d33bfa43cc067dd6ea6a0e41115f27b50cd5a35/README.md?plain=1#L75 ?

How dare they set up non-user services when not on non-NixOS :rolling_on_the_floor_laughing: ?

view this post on Zulip corocoton (Jul 10 2024 at 08:41):

Andreas schrieb:

That's actually systemd --user

Is it? Where did you get that from?

but please you know more, tell me.

view this post on Zulip Andreas (Jul 10 2024 at 08:43):

I don't know, I haven't tried that thing. But it appears to need root permissions, so I'd guess is manages normal systemd services on Ubuntu?

view this post on Zulip corocoton (Jul 10 2024 at 08:59):

Andreas schrieb:

I don't know, I haven't tried that thing. But it appears to need root permissions, so I'd guess is manages normal systemd services on Ubuntu?

Ah ok, then I can strike that from my list immediately, good to know. I was assuming your Ubuntu-remark fun, but with that information makes sense to me too.

view this post on Zulip corocoton (Jul 10 2024 at 09:00):

Andreas schrieb:

I don't know, I haven't tried that thing. But it appears to need root permissions, so I'd guess is manages normal systemd services on Ubuntu?

https://github.com/numtide/system-manager/blob/4d33bfa43cc067dd6ea6a0e41115f27b50cd5a35/src/main.rs#L438 proof

view this post on Zulip corocoton (Jul 10 2024 at 09:04):

Andreas schrieb:

I don't know, I haven't tried that thing. But it appears to need root permissions, so I'd guess is manages normal systemd services on Ubuntu?

thx for the nitpick.

view this post on Zulip Shivaraj B H (Jul 10 2024 at 13:16):

I want to be able to run that on non-NixOS, that the involved services run in foreground is not an obstacle for me, so let's call it an exercise rather than an enhancement of services-flake.

@corocoton In that case, you can open an issue in services-flake to add the service and I can check it out when I get sometime.


Last updated: Nov 15 2024 at 12:33 UTC