system: "x86_64-linux"
multi-user?: yes
version: nix-env (Nix) 2.31.2
channels(root): "home-manager-25.11.tar.gz
nixos-25.11"
nixpkgs: /nix/store/sac0rlr0ca9774bik89x3scbf7xrvqyd-nixos-25.11/nixos
I use PostGreSQL on my NixOS seldom. That is why I used the following trick to avoid that the service is started automatically:
systemd.services.postgresql.wantedBy = pkgs.lib.mkForce [ ];
cf post How to avoid service postgresql starting automatically .
But since the update to 25.11 the service automatically on system boot again; the trick above does not work anymore.
What can I do to avoid the startUp of PostGres ?
Here my NixConfig (prop.installPostgresql = true for this machine)
services.postgresql = if prop.installPostgresql then {
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
'';
enable = true;
enableTCPIP = false;
extensions = with pkgs.postgresql_18.pkgs; [ pg_rational pg_repack ];
package = pkgs.postgresql_18;
} else {
enable = false;
};