Closed rpearce closed 5 years ago
The modules in Home Manager are separate from the ones in NixOS and unfortunately they are incompatible with each other. Second, NixOS modules are only for NixOS, i.e., would not work under macOS. All services in HM and NixOS are run through systemd so they will not work under macOS.
Fortunately, the nix-darwin project seems to have a postgresql module that you could try.
Okay, thanks for looking at it and explaining!
Hi! I don't know if this question belongs in
home-manager
, but it's worth a shot. Disclaimer: still relatively noob at nix.I've successfully installed
postgresql_11
via this project, but I am not sure how to enable the postgresql service. Am I just doing this wrong? Here's what I'm working with:
```nix { pkgs, ... }: let nixpkgsConfig = import ./nixpkgs/config.nix; user = import ./user.nix; xdg = import ./xdg.nix; in { nixpkgs = { config = nixpkgsConfig; }; xdg = xdg; home.packages = with pkgs; [ postgresql_11 # ...other packages ]; programs.home-manager = (import ./programs/home-manager.nix { }); # ...other programs home.file.".psqlrc".source = ../conf/.psqlrc; # ...other dotfiles } ```home.nix
```nix { allowBroken = true; allowUnfree = true; packageOverrides = pkgs: rec { # ...package overrides }; services.postgresql = pkgs: rec { enable = true; package = pkgs.postgresql_11; port = 5432; }; } ```nixpkgs/config.nix
I have all of the CLI tools, but it doesn't seem like it's getting enabled, and I can't find any of the relevant files/services that should be created as per https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/postgresql.nix.
Any help or guidance would be super helpful!