5

I'm using nix as a package manager on OSX. I've installed postgres. Now I'd like to start and stop the postgres server (and other related utilities). I can write a script to do this manually, and edit my config. But, is there a "best practice" way to do this on OSX? E.g. I found postgres configs under ~/.nix-profile/share, are there startup scrips for OSX somewhere?

1 Answer 1

1

I've not come across anything related to the nix project for running services in the nixpkgs repo directly on OS X.

If you just have a few services you want to run I believe you'd have to put the scripts together yourself as you suggest.

Alternatively disnix should do what you're after but it might be a bit overkill just for one machine.

Another option would be to deploy a nixos configuration into a (optionally headless) virtualbox instance with nixops. I'm using this setup myself for a different use case, but it should certainly also support yours.

disnix, nixos and nixops are documented together with nix/nixpkgs on the nixos.org page.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the direction! I ended up writing a couple simple scripts and manually setting up config/data dirs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.