guix/gnu/services
Martin Baulig 9dda747975
services: posgresql: Add option to specify UID/GID for postgres user.
Add 'createAccount?', 'uid' and 'gid' to <postgresql-configuation>.

Unlike other system daemons, the PostgreSQL data directory is typically
meant to persist across 'guix system reconfigure' and once created, you
don't want it's UID or GID to change anymore.

Furthermore, if you want to place the data directory on a network share
and use NFSv4 with idmap, then the 'postgres' user must exist when the
'rpc.idmapd' daemon is launched; prior to mounting the share.  And it
needs to be possible to mount the share without configuring PostgreSQL.

With NFSv3, the UID and GID typically needs to match those on the
server.

The added options allow for both of these scenarios:

You can either create the user in (operating-system (users)) completely
independently of the 'postgresql-service-type' (for instance to get your
NFS setup working first prior to configuring your databases) - or "pin"
it's UID / GID values.

* gnu/services/databases.scm (<postgresql-configuration>)[create-account?]
[uid, gid]: New fields.
(%postgresql-accounts): Remove.
(create-postgresql-account): New procedure.
(postgresql-service-type)[extensions]: Use it.
* doc/guix.texi (Database Services): Update accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-16 22:37:52 +02:00
..
admin.scm services: Add 'package-database' service. 2023-08-07 15:11:45 +02:00
audio.scm Revert "services: mpd: Add an 'update' action to trigger a database update." 2023-07-26 12:04:37 -04:00
auditd.scm
authentication.scm services: Use more 'file-append'. 2023-08-15 23:30:44 +02:00
avahi.scm
base.scm services: Use more 'file-append'. 2023-08-15 23:30:44 +02:00
certbot.scm services: certbot: Fix nginx crash when certbot is used without domains. 2023-06-18 23:12:10 +02:00
cgit.scm services: cgit: Remove ‘cgit-repo’ left-overs. 2023-07-02 02:00:09 +02:00
ci.scm
configuration.scm services: configuration: Add user-defined sanitizer support. 2023-04-02 12:31:51 +02:00
cuirass.scm
cups.scm services: cups: Add cups PAM service. 2023-05-23 20:26:19 -04:00
databases.scm services: posgresql: Add option to specify UID/GID for postgres user. 2023-08-16 22:37:52 +02:00
dbus.scm Merge remote-tracking branch 'origin/master' into core-updates 2023-03-20 18:49:06 +01:00
desktop.scm gnu: elogind: Update to 252.9. 2023-08-16 11:24:10 -04:00
dict.scm services: dicod: Use one inetd endpoint per interface. 2023-06-24 16:11:07 +02:00
dns.scm services: knot: Add 'configuration' action. 2023-04-21 16:16:37 +02:00
docker.scm file-systems: Use cgroups v2. 2023-08-08 18:01:55 +02:00
file-sharing.scm
games.scm gnu: services: Add joycond-service. 2023-01-14 07:53:21 -05:00
ganeti.scm
getmail.scm
guix.scm services: guix-data-service: Unlink the two shepherd services. 2023-07-26 10:31:58 +01:00
herd.scm services: herd: Add a new 'current-service' procedure. 2023-07-21 11:58:44 -04:00
hurd.scm
kerberos.scm services: Use more 'file-append'. 2023-08-15 23:30:44 +02:00
ldap.scm
lightdm.scm system: pam: Let PAM extensions add shepherd requirements. 2023-05-11 13:21:45 +02:00
linux.scm services: Add cachefilesd service. 2023-08-15 23:30:44 +02:00
lirc.scm services: lirc: Deprecate 'lirc-service' procedure. 2023-03-03 17:55:34 +01:00
mail.scm system: pam: Let PAM extensions add shepherd requirements. 2023-05-11 13:21:45 +02:00
mcron.scm services: mcron: Add log-file and date-format fields. 2023-03-21 14:51:24 -04:00
messaging.scm services: Transient inetd services inherit requirements. 2023-05-21 01:04:39 +02:00
monitoring.scm services: Add vnstat-service-type. 2023-05-11 16:38:29 +02:00
networking.scm services: inetd: Export accessors. 2023-05-11 16:38:29 +02:00
nfs.scm
nix.scm
pam-mount.scm services: Use more 'file-append'. 2023-08-15 23:30:44 +02:00
pm.scm
rsync.scm services: rsync: Use least authority wrapper. 2023-05-18 23:11:19 -04:00
samba.scm
science.scm
sddm.scm system: pam: Let PAM extensions add shepherd requirements. 2023-05-11 13:21:45 +02:00
security-token.scm
security.scm services: replace bare serializers with (serializer ...) 2023-04-02 12:35:30 +02:00
shepherd.scm services: Validate 'provision' field of <shepherd-service>. 2023-06-25 23:46:03 +02:00
sound.scm services: ladspa: Export accessors. 2023-03-07 11:39:50 +01:00
spice.scm services: spice: Deprecate 'spice-vdagent-service' procedure. 2023-03-03 17:55:35 +01:00
ssh.scm services: Transient inetd services inherit requirements. 2023-05-21 01:04:39 +02:00
syncthing.scm services: syncthing: Use the new command line syntax. 2023-08-11 00:50:48 +02:00
sysctl.scm
telephony.scm gnu: libjami: Move jamid daemon to a "bin" output. 2023-02-08 09:36:26 -05:00
version-control.scm
virtualization.scm services: childhurd: Bump default qemu memory to 2048MB. 2023-07-13 18:59:02 +02:00
vnc.scm services: Transient inetd services inherit requirements. 2023-05-21 01:04:39 +02:00
vpn.scm services: wireguard: Add a 'configuration' action. 2023-07-21 11:58:45 -04:00
web.scm services: nginx: Harden php-location settings. 2023-07-02 02:00:01 +02:00
xorg.scm services: screen-locker-service-type: Configurable PAM and setuid. 2023-06-04 10:33:55 +02:00