nixpkgs/nixos/modules/services
aszlig ef553788d0
postgresql: Move socket dir to /run/postgresql
The default, which is /tmp, has a few issues associated with it:

One being that it makes it easy for users on the system to spoof a
PostgreSQL server if it's not running, causing applications to connect
to their provided sockets instead of just failing to connect.

Another one is that it makes sandboxing of PostgreSQL and other services
unnecessarily difficult. This is already the case if only PrivateTmp is
used in a systemd service, so in order for such a service to be able to
connect to PostgreSQL, a bind mount needs to be done from /tmp to some
other path, so the service can access it. This pretty much defeats the
whole purpose of PrivateTmp.

We regularily run into issues with this in the past already (one example
would be https://github.com/NixOS/nixpkgs/pull/24317) and with the new
systemd-confinement mode upcoming in
https://github.com/NixOS/nixpkgs/pull/57519, it makes it even more
tedious to sandbox services.

I've tested this change against all the postgresql NixOS VM tests and
they still succeed and I also grepped through the source tree to replace
other occasions where we might have /tmp hardcoded. Luckily there were
very few occasions.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @ocharles, @thoughtpolice, @danbst
2019-03-15 04:52:35 +01:00
..
admin salt: Restart on config changes 2018-10-15 19:59:25 -07:00
amqp rabbitmq module: Update documentation after proofreading 2018-11-03 19:19:04 +01:00
audio Merge pull request #55936 from tobim/modules/snapserver 2019-03-07 00:00:48 +01:00
backup nixos/duplicity: init 2019-02-03 19:13:01 +01:00
cluster nixos/kubernetes: add dns addonmanger reconcile mode option (#55834) 2019-03-09 12:57:41 +02:00
computing nixos/slurm: add extraConfigPaths options 2018-11-22 11:43:05 +01:00
continuous-integration nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
databases postgresql: Move socket dir to /run/postgresql 2019-03-15 04:52:35 +01:00
desktops nixos/gnome-settings-daemon: init 2019-03-01 14:55:12 -05:00
development nixos/jupyter: wait for network.target 2018-11-06 20:40:20 +01:00
editors Treewide: use HTTPS on GNU domains 2018-12-02 15:51:59 +01:00
games nixos/mincraft-server: refactor 2019-02-03 02:16:11 +01:00
hardware Merge pull request #55142 from FlorianFranzen/thinkfan_smart 2019-03-05 17:47:13 +07:00
logging nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
mail Merge pull request #52096 from furrycatherder/davmail 2019-03-09 22:41:55 +01:00
misc nixos/gitlab: added gzip and bzip2 as dependencies for gitaly 2019-03-12 15:04:45 +00:00
monitoring nixos/prometheus: use append instead of insert for opening firewalls (#55224) 2019-03-13 12:44:36 +02:00
network-filesystems openafs: minor documentation fix 2019-02-26 14:49:59 -05:00
networking nixos/flannel: Add iptables package to service path 2019-03-12 15:30:33 +00:00
printing nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
scheduling nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
search pythonPackages.elasticsearch-curator: 5.5.4 -> 5.6.0 2018-12-13 20:58:58 +01:00
security munge: fix module munge.key permissions from 0700 -> 0400 readonly 2019-01-30 12:53:54 -05:00
system Merge remote-tracking branch 'upstream/master' into staging 2018-12-16 22:55:06 +01:00
torrent nixos/transmission: Bug fix Appamor Transmission startup errors (#54873) 2019-01-31 17:51:48 +00:00
ttys nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
web-apps postgresql: Move socket dir to /run/postgresql 2019-03-15 04:52:35 +01:00
web-servers nixos/nginx: support h2c 2019-03-08 17:50:46 +00:00
x11 plasma5: fix typo from pr #57037 2019-03-14 14:09:13 -04:00