Starting a package as a service on MacOs

Hi,

I realize that my question is a bit far from flox, but this is still a result of not using brew nor NixOS.

I was able to install the yubikey-agent package to give access to my new yubikey. However I can’t find how to start the downloaded executable as a service with launchctl on Mac. Is it something that someone already attempted? If not, don’t worry, I’ll keep on digging.

Thanks.

Did you ever figure out how to do this? I haven’t attempted to do it, but I’m guessing you could start /Users/matthew/.local/share/flox/environments/mkenigs/aarch64-darwin.default/bin/yubikey-agent with launchctl.

This does start to touch on user-wide configuration, which flox hasn’t addressed yet. I’m curious, would you want something like starting yubikey-agent to be part of your default environment? You could add that in shell.hook of your default environment, but I’m not sure that’s the right place for it. And maybe you can only have one instance of yubikey-agent? There’s probably some things that should be part of system or user config that flox doesn’t support yet. Maybe we should integrate with GitHub - LnL7/nix-darwin: nix modules for darwin

Hi Matthew,

I’m curious, would you want something like starting yubikey-agent to be part of your default environment?

Yes that’s certainly the kind of thing I would like to do in that case.

And maybe you can only have one instance of yubikey-agent?

Indeed.

Coming from Homebrew I would probably have done brew start in the past, but I didn’t know what would be the right approach with flox.