nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

services / documentation issue?

Open MarcWeber opened this issue 1 year ago • 3 comments

I'm interested to port PHP/MySQL to OSX I had for nixos.

So it seems you can install systemd for darwin/osx: https://formulae.brew.sh/formula/systemd but no idea whether it would handle mysql like services.

It would be nice if you could document how you imagine this to be done on OSX whether and how services might be supported.

MarcWeber avatar Jul 03 '24 06:07 MarcWeber

You can’t use systemd to manage services on macOS; you use launchd, which inspired systemd, instead. You can search the nix-darwin source for examples of how to define launchd daemons in Nix.

emilazy avatar Jul 03 '24 10:07 emilazy

The channel's postgresql service eventually is missing -D trying master. A lot of services like mysql/postgresql/apache2 whatever share a lot with nixos especially the configuartion file constructions stuff. Is there any planned future or just duplicate code or use flakes ?

MarcWeber avatar Jul 03 '24 16:07 MarcWeber

Ok, looks like I got postgresql finally working by removing internal/readonly, by setting dataDir to /Users/m/somtehnig and using superUser=my-user-name .. pg is up and running. But its a nice example that some 'documentation' might be helpful such as: "Hey, defualt user eg for pg is postgres, so make sure you create that user or change it to env "USER'

MarcWeber avatar Jul 03 '24 16:07 MarcWeber