LnL7 / nix-darwin

nix modules for darwin
MIT License
2.44k stars 408 forks source link

services / documentation issue? #994

Open MarcWeber opened 5 days ago

MarcWeber commented 5 days ago

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.

emilazy commented 5 days ago

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.

MarcWeber commented 5 days ago

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 commented 5 days ago

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'