Hi All!
I use PostGreSQL on my NixOS seldom but it is started automatically on system boot.
I would like the service not to be started automatically but rather start it manually when I need it.
How can I achieve this?
Here my current settings:
services = {
...
postgresql = {
enable = true;
enableTCPIP = false;
package = pkgs.postgresql_15;
start = false;
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
'';
};
};
The following two attempts failed:
enable = false;
systemctl enable/start
Unit file postgresql.service does not exist.
wantedBy = pkgs.lib.mkForce [];
nixos-rebuild test
The option `services.postgresql.wantedBy’ does not exist.