+3
-3
doc/languages-frameworks/beam.section.md
+3
-3
doc/languages-frameworks/beam.section.md
···
+5
-13
nixos/doc/manual/redirects.json
+5
-13
nixos/doc/manual/redirects.json
···
+2
nixos/doc/manual/release-notes/rl-2511.section.md
+2
nixos/doc/manual/release-notes/rl-2511.section.md
···- The `yeahwm` package and `services.xserver.windowManager.yeahwm` module were removed due to the package being broken and unmaintained upstream.+- The `services.postgresql` module now sets up a systemd unit `postgresql.target`. Depending on `postgresql.target` guarantees that initial/ensure scripts were executed.- The `services.siproxd` module has been removed as `siproxd` is unmaintained and broken with libosip 5.x.- `services.dwm-status.extraConfig` was replaced by [RFC0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md)-compliant [](#opt-services.dwm-status.settings), which is used to generate the config file. `services.dwm-status.order` is now moved to [](#opt-services.dwm-status.settings.order), as it's a part of the config file.
+1
-1
nixos/modules/services/admin/pgadmin.nix
+1
-1
nixos/modules/services/admin/pgadmin.nix
···
+1
-1
nixos/modules/services/backup/bacula.nix
+1
-1
nixos/modules/services/backup/bacula.nix
+1
-1
nixos/modules/services/backup/postgresql-backup.nix
+1
-1
nixos/modules/services/backup/postgresql-backup.nix
+2
-2
nixos/modules/services/continuous-integration/hydra/default.nix
+2
-2
nixos/modules/services/continuous-integration/hydra/default.nix
···
+2
-2
nixos/modules/services/databases/pgmanage.nix
+2
-2
nixos/modules/services/databases/pgmanage.nix
···
+1
-1
nixos/modules/services/databases/postgres-websockets.nix
+1
-1
nixos/modules/services/databases/postgres-websockets.nix
+10
-59
nixos/modules/services/databases/postgresql.md
+10
-59
nixos/modules/services/databases/postgresql.md
···+#### in database's setup `postStart` {#module-services-postgres-initializing-extra-permissions-superuser-post-start}-##### in database `postStart` {#module-services-postgres-initializing-extra-permissions-superuser-post-start}-##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-superuser-oneshot}+#### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-superuser-oneshot}···-**Disadvantage:** relies on service user having grant permission. To be combined with `ensureDBOwnership`.-##### in service `preStart` {#module-services-postgres-initializing-extra-permissions-service-user-pre-start}-##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-service-user-oneshot}
+70
-44
nixos/modules/services/databases/postgresql.nix
+70
-44
nixos/modules/services/databases/postgresql.nix
······-$PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${database}"'-dbOwnershipStmt = optionalString user.ensureDBOwnership ''$PSQL -tAc 'ALTER DATABASE "${user.name}" OWNER TO "${user.name}";' '';-clauseSqlStatements = attrValues (mapAttrs (n: v: if v then n else "no${n}") filteredClauses);-userClauses = ''$PSQL -tAc 'ALTER ROLE "${user.name}" ${concatStringsSep " " clauseSqlStatements}' '';-$PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc 'CREATE USER "${user.name}"'···+psql -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || psql -tAc 'CREATE DATABASE "${database}"'+dbOwnershipStmt = optionalString user.ensureDBOwnership ''psql -tAc 'ALTER DATABASE "${user.name}" OWNER TO "${user.name}";' '';+clauseSqlStatements = attrValues (mapAttrs (n: v: if v then n else "no${n}") filteredClauses);+userClauses = ''psql -tAc 'ALTER ROLE "${user.name}" ${concatStringsSep " " clauseSqlStatements}' '';+psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || psql -tAc 'CREATE USER "${user.name}"'
+1
-1
nixos/modules/services/databases/postgrest.nix
+1
-1
nixos/modules/services/databases/postgrest.nix
+2
-2
nixos/modules/services/development/zammad.nix
+2
-2
nixos/modules/services/development/zammad.nix
···
+2
-2
nixos/modules/services/finance/libeufin/common.nix
+2
-2
nixos/modules/services/finance/libeufin/common.nix
···-after = [ "network.target" ] ++ lib.optionals cfg.createLocalDatabase [ "postgresql.service" ];+after = [ "network.target" ] ++ lib.optionals cfg.createLocalDatabase [ "postgresql.target" ];
+2
-2
nixos/modules/services/finance/odoo.nix
+2
-2
nixos/modules/services/finance/odoo.nix
···
+2
-2
nixos/modules/services/finance/taler/common.nix
+2
-2
nixos/modules/services/finance/taler/common.nix
+1
-1
nixos/modules/services/home-automation/home-assistant.nix
+1
-1
nixos/modules/services/home-automation/home-assistant.nix
+1
-1
nixos/modules/services/mail/dspam.nix
+1
-1
nixos/modules/services/mail/dspam.nix
+1
-1
nixos/modules/services/mail/listmonk.nix
+1
-1
nixos/modules/services/mail/listmonk.nix
···
+6
-6
nixos/modules/services/mail/mailman.nix
+6
-6
nixos/modules/services/mail/mailman.nix
·········
+2
-2
nixos/modules/services/mail/postfixadmin.nix
+2
-2
nixos/modules/services/mail/postfixadmin.nix
···
+2
-2
nixos/modules/services/mail/roundcube.nix
+2
-2
nixos/modules/services/mail/roundcube.nix
···
+1
-1
nixos/modules/services/matrix/appservice-irc.nix
+1
-1
nixos/modules/services/matrix/appservice-irc.nix
···
+1
-1
nixos/modules/services/matrix/maubot.nix
+1
-1
nixos/modules/services/matrix/maubot.nix
···-after = [ "network.target" ] ++ wants ++ lib.optional hasLocalPostgresDB "postgresql.service";wants = lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
+1
-1
nixos/modules/services/matrix/synapse-auto-compressor.nix
+1
-1
nixos/modules/services/matrix/synapse-auto-compressor.nix
+4
-4
nixos/modules/services/matrix/synapse.nix
+4
-4
nixos/modules/services/matrix/synapse.nix
······
+3
-3
nixos/modules/services/misc/atuin.nix
+3
-3
nixos/modules/services/misc/atuin.nix
···
+1
-1
nixos/modules/services/misc/disnix.nix
+1
-1
nixos/modules/services/misc/disnix.nix
···
+2
-2
nixos/modules/services/misc/forgejo.nix
+2
-2
nixos/modules/services/misc/forgejo.nix
······
+1
-1
nixos/modules/services/misc/gammu-smsd.nix
+1
-1
nixos/modules/services/misc/gammu-smsd.nix
···-[ ] ++ lib.optionals (service == "sql" && sql.driver == "native_pgsql") [ "postgresql.service" ];+[ ] ++ lib.optionals (service == "sql" && sql.driver == "native_pgsql") [ "postgresql.target" ];
+2
-2
nixos/modules/services/misc/gitea.nix
+2
-2
nixos/modules/services/misc/gitea.nix
···
+9
-9
nixos/modules/services/misc/gitlab.nix
+9
-9
nixos/modules/services/misc/gitlab.nix
············-wants = [ "redis-gitlab.service" ] ++ optional (cfg.databaseHost == "") "postgresql.service";···-wants = [ "redis-gitlab.service" ] ++ optional (cfg.databaseHost == "") "postgresql.service";
+8
-8
nixos/modules/services/misc/paperless.nix
+8
-8
nixos/modules/services/misc/paperless.nix
·········
+1
-1
nixos/modules/services/misc/redmine.nix
+1
-1
nixos/modules/services/misc/redmine.nix
···
+5
-7
nixos/modules/services/misc/sourcehut/service.nix
+5
-7
nixos/modules/services/misc/sourcehut/service.nix
······
+1
-1
nixos/modules/services/monitoring/grafana.nix
+1
-1
nixos/modules/services/monitoring/grafana.nix
···
+1
-1
nixos/modules/services/monitoring/zabbix-proxy.nix
+1
-1
nixos/modules/services/monitoring/zabbix-proxy.nix
···
+2
-2
nixos/modules/services/monitoring/zabbix-server.nix
+2
-2
nixos/modules/services/monitoring/zabbix-server.nix
······
+2
-2
nixos/modules/services/networking/atticd.nix
+2
-2
nixos/modules/services/networking/atticd.nix
···-after = [ "network-online.target" ] ++ lib.optionals hasLocalPostgresDB [ "postgresql.service" ];+after = [ "network-online.target" ] ++ lib.optionals hasLocalPostgresDB [ "postgresql.target" ];
+2
-2
nixos/modules/services/networking/firezone/server.nix
+2
-2
nixos/modules/services/networking/firezone/server.nix
···description = "Backend initialization service for the Firezone zero-trust access platform";
+1
-1
nixos/modules/services/networking/pleroma.nix
+1
-1
nixos/modules/services/networking/pleroma.nix
+1
-1
nixos/modules/services/networking/powerdns.nix
+1
-1
nixos/modules/services/networking/powerdns.nix
+1
-1
nixos/modules/services/networking/quassel.nix
+1
-1
nixos/modules/services/networking/quassel.nix
···
+2
-2
nixos/modules/services/security/canaille.nix
+2
-2
nixos/modules/services/security/canaille.nix
······
+2
-2
nixos/modules/services/torrent/bitmagnet.nix
+2
-2
nixos/modules/services/torrent/bitmagnet.nix
···
+2
-2
nixos/modules/services/web-apps/akkoma.nix
+2
-2
nixos/modules/services/web-apps/akkoma.nix
······
+1
-1
nixos/modules/services/web-apps/crabfit.nix
+1
-1
nixos/modules/services/web-apps/crabfit.nix
+3
-3
nixos/modules/services/web-apps/davis.nix
+3
-3
nixos/modules/services/web-apps/davis.nix
······
+3
-3
nixos/modules/services/web-apps/dependency-track.nix
+3
-3
nixos/modules/services/web-apps/dependency-track.nix
······
+1
-1
nixos/modules/services/web-apps/dex.nix
+1
-1
nixos/modules/services/web-apps/dex.nix
···
+6
-6
nixos/modules/services/web-apps/discourse.nix
+6
-6
nixos/modules/services/web-apps/discourse.nix
······
+2
-2
nixos/modules/services/web-apps/fider.nix
+2
-2
nixos/modules/services/web-apps/fider.nix
···
+1
-1
nixos/modules/services/web-apps/filesender.nix
+1
-1
nixos/modules/services/web-apps/filesender.nix
+2
-2
nixos/modules/services/web-apps/firefly-iii.nix
+2
-2
nixos/modules/services/web-apps/firefly-iii.nix
······
+3
-3
nixos/modules/services/web-apps/froide-govplan.nix
+3
-3
nixos/modules/services/web-apps/froide-govplan.nix
······
+1
-1
nixos/modules/services/web-apps/gancio.nix
+1
-1
nixos/modules/services/web-apps/gancio.nix
···
+2
-2
nixos/modules/services/web-apps/glitchtip.nix
+2
-2
nixos/modules/services/web-apps/glitchtip.nix
···
+2
-2
nixos/modules/services/web-apps/homebox.nix
+2
-2
nixos/modules/services/web-apps/homebox.nix
···
+1
-1
nixos/modules/services/web-apps/immich.nix
+1
-1
nixos/modules/services/web-apps/immich.nix
···
+2
-2
nixos/modules/services/web-apps/invidious.nix
+2
-2
nixos/modules/services/web-apps/invidious.nix
···-after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";+after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.target";
+3
-3
nixos/modules/services/web-apps/keycloak.nix
+3
-3
nixos/modules/services/web-apps/keycloak.nix
······
+4
-4
nixos/modules/services/web-apps/lasuite-docs.nix
+4
-4
nixos/modules/services/web-apps/lasuite-docs.nix
······
+2
-2
nixos/modules/services/web-apps/lemmy.nix
+2
-2
nixos/modules/services/web-apps/lemmy.nix
···-after = [ "pict-rs.service" ] ++ lib.optionals cfg.database.createLocally [ "postgresql.service" ];+after = [ "pict-rs.service" ] ++ lib.optionals cfg.database.createLocally [ "postgresql.target" ];
+2
-2
nixos/modules/services/web-apps/limesurvey.nix
+2
-2
nixos/modules/services/web-apps/limesurvey.nix
······
+11
-11
nixos/modules/services/web-apps/mastodon.nix
+11
-11
nixos/modules/services/web-apps/mastodon.nix
············
+2
-2
nixos/modules/services/web-apps/mattermost.nix
+2
-2
nixos/modules/services/web-apps/mattermost.nix
······
+2
-2
nixos/modules/services/web-apps/mealie.nix
+2
-2
nixos/modules/services/web-apps/mealie.nix
···-after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";+after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.target";
+2
-2
nixos/modules/services/web-apps/mediagoblin.nix
+2
-2
nixos/modules/services/web-apps/mediagoblin.nix
···
+2
-2
nixos/modules/services/web-apps/mediawiki.nix
+2
-2
nixos/modules/services/web-apps/mediawiki.nix
···-++ optional (cfg.database.type == "postgres" && cfg.database.createLocally) "postgresql.service";+++ optional (cfg.database.type == "postgres" && cfg.database.createLocally) "postgresql.target";···
+3
-3
nixos/modules/services/web-apps/miniflux.nix
+3
-3
nixos/modules/services/web-apps/miniflux.nix
······
+1
-1
nixos/modules/services/web-apps/misskey.nix
+1
-1
nixos/modules/services/web-apps/misskey.nix
+1
-1
nixos/modules/services/web-apps/mobilizon.nix
+1
-1
nixos/modules/services/web-apps/mobilizon.nix
···
+2
-2
nixos/modules/services/web-apps/moodle.nix
+2
-2
nixos/modules/services/web-apps/moodle.nix
···${phpExt}/bin/php ${cfg.package}/share/moodle/admin/cli/check_database_schema.php && rc=$? || rc=$?···
+8
-8
nixos/modules/services/web-apps/movim.nix
+8
-8
nixos/modules/services/web-apps/movim.nix
·········-requires = [ "movim-data-setup.service" ] ++ lib.optional cfg.database.createLocally dbService;···
+2
-2
nixos/modules/services/web-apps/nextcloud.nix
+2
-2
nixos/modules/services/web-apps/nextcloud.nix
···
+2
-2
nixos/modules/services/web-apps/nipap.nix
+2
-2
nixos/modules/services/web-apps/nipap.nix
···
+4
-4
nixos/modules/services/web-apps/onlyoffice.nix
+4
-4
nixos/modules/services/web-apps/onlyoffice.nix
······
+2
-2
nixos/modules/services/web-apps/outline.nix
+2
-2
nixos/modules/services/web-apps/outline.nix
···
+3
-3
nixos/modules/services/web-apps/part-db.nix
+3
-3
nixos/modules/services/web-apps/part-db.nix
······
+4
-4
nixos/modules/services/web-apps/peertube.nix
+4
-4
nixos/modules/services/web-apps/peertube.nix
······
+6
-6
nixos/modules/services/web-apps/pixelfed.nix
+6
-6
nixos/modules/services/web-apps/pixelfed.nix
············description = "Pixelfed setup: migrations, environment file update, cache reload, data changes";
+3
-3
nixos/modules/services/web-apps/plausible.nix
+3
-3
nixos/modules/services/web-apps/plausible.nix
······
+2
-2
nixos/modules/services/web-apps/pretalx.nix
+2
-2
nixos/modules/services/web-apps/pretalx.nix
······
+2
-2
nixos/modules/services/web-apps/pretix.nix
+2
-2
nixos/modules/services/web-apps/pretix.nix
······
+1
-1
nixos/modules/services/web-apps/reposilite.nix
+1
-1
nixos/modules/services/web-apps/reposilite.nix
···
+1
-1
nixos/modules/services/web-apps/shiori.nix
+1
-1
nixos/modules/services/web-apps/shiori.nix
+2
-2
nixos/modules/services/web-apps/sogo.nix
+2
-2
nixos/modules/services/web-apps/sogo.nix
······
+2
-2
nixos/modules/services/web-apps/tt-rss.nix
+2
-2
nixos/modules/services/web-apps/tt-rss.nix
···
+1
-1
nixos/modules/services/web-apps/vikunja.nix
+1
-1
nixos/modules/services/web-apps/vikunja.nix
···
+2
-2
nixos/modules/services/web-apps/wakapi.nix
+2
-2
nixos/modules/services/web-apps/wakapi.nix
···
+2
-2
nixos/modules/services/web-apps/weblate.nix
+2
-2
nixos/modules/services/web-apps/weblate.nix
······
+30
-32
nixos/modules/services/web-apps/windmill.nix
+30
-32
nixos/modules/services/web-apps/windmill.nix
·········
+2
-2
nixos/modules/services/web-apps/zipline.nix
+2
-2
nixos/modules/services/web-apps/zipline.nix
···-after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";+after = [ "network-online.target" ] ++ lib.optional cfg.database.createLocally "postgresql.target";
+1
-1
nixos/modules/services/web-servers/keter/default.nix
+1
-1
nixos/modules/services/web-servers/keter/default.nix
+1
-1
nixos/tests/coder.nix
+1
-1
nixos/tests/coder.nix
+1
-1
nixos/tests/davis.nix
+1
-1
nixos/tests/davis.nix
···
+2
-2
nixos/tests/documize.nix
+2
-2
nixos/tests/documize.nix
+2
-2
nixos/tests/ferretdb.nix
+2
-2
nixos/tests/ferretdb.nix
+1
-1
nixos/tests/firefly-iii.nix
+1
-1
nixos/tests/firefly-iii.nix
···
+2
-2
nixos/tests/freshrss/pgsql.nix
+2
-2
nixos/tests/freshrss/pgsql.nix
+1
-1
nixos/tests/gancio.nix
+1
-1
nixos/tests/gancio.nix
+1
-1
nixos/tests/gitlab.nix
+1
-1
nixos/tests/gitlab.nix
···gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/backup/dump_gitlab_backup.tar")"find ${nodes.gitlab.services.gitlab.statePath} -mindepth 1 -maxdepth 1 -not -name backup -execdir rm -r {} +"
+2
-2
nixos/tests/grafana/basic.nix
+2
-2
nixos/tests/grafana/basic.nix
······
+4
-4
nixos/tests/hedgedoc.nix
+4
-4
nixos/tests/hedgedoc.nix
·········
+1
-1
nixos/tests/hydra/default.nix
+1
-1
nixos/tests/hydra/default.nix
···
+1
-1
nixos/tests/invidious.nix
+1
-1
nixos/tests/invidious.nix
···machine.succeed("journalctl -eu invidious.service | grep -o \"SigHelper: Using helper at 'tcp://127.0.0.1:2999'\"")
+1
-1
nixos/tests/listmonk.nix
+1
-1
nixos/tests/listmonk.nix
···return f'curl -u "{basic_auth}" -X {type} "http://localhost:9000/api/{url}" -H "Content-Type: application/json; charset=utf-8" --data-raw \'{json_data}\'''
+1
-1
nixos/tests/matrix/synapse.nix
+1
-1
nixos/tests/matrix/synapse.nix
···serverpostgres.succeed("REQUESTS_CA_BUNDLE=${ca_pem} register_new_matrix_user -u ${testUser} -p ${testPassword} -a -k ${registrationSharedSecret} https://localhost:8448/")
+2
-2
nixos/tests/miniflux.nix
+2
-2
nixos/tests/miniflux.nix
······
+3
-3
nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix
+3
-3
nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix
···
+2
-2
nixos/tests/pgadmin4.nix
+2
-2
nixos/tests/pgadmin4.nix
···machine.wait_until_succeeds("curl -sS localhost:5051/login | grep \"<title>pgAdmin 4</title>\" > /dev/null")···
+1
-1
nixos/tests/pgbackrest/sftp.nix
+1
-1
nixos/tests/pgbackrest/sftp.nix
···
+1
-1
nixos/tests/pgbouncer.nix
+1
-1
nixos/tests/pgbouncer.nix
···${pkgs.postgresql}/bin/psql -U postgres -c "ALTER ROLE testuser WITH LOGIN PASSWORD 'testpass'";
+1
-1
nixos/tests/pghero.nix
+1
-1
nixos/tests/pghero.nix
···
+1
-1
nixos/tests/pgweb.nix
+1
-1
nixos/tests/pgweb.nix
+1
-1
nixos/tests/pleroma.nix
+1
-1
nixos/tests/pleroma.nix
···
+1
-1
nixos/tests/postfixadmin.nix
+1
-1
nixos/tests/postfixadmin.nix
···
+1
-1
nixos/tests/postgres-websockets.nix
+1
-1
nixos/tests/postgres-websockets.nix
···
+1
-1
nixos/tests/postgresql/anonymizer.nix
+1
-1
nixos/tests/postgresql/anonymizer.nix
···
+1
-1
nixos/tests/postgresql/pgjwt.nix
+1
-1
nixos/tests/postgresql/pgjwt.nix
+1
-1
nixos/tests/postgresql/postgresql-jit.nix
+1
-1
nixos/tests/postgresql/postgresql-jit.nix
+2
-2
nixos/tests/postgresql/postgresql-wal-receiver.nix
+2
-2
nixos/tests/postgresql/postgresql-wal-receiver.nix
···# WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other···
+3
-3
nixos/tests/postgresql/postgresql.nix
+3
-3
nixos/tests/postgresql/postgresql.nix
·········
+1
-1
nixos/tests/postgresql/wal2json.nix
+1
-1
nixos/tests/postgresql/wal2json.nix
+1
-1
nixos/tests/postgrest.nix
+1
-1
nixos/tests/postgrest.nix
+1
-1
nixos/tests/powerdns-admin.nix
+1
-1
nixos/tests/powerdns-admin.nix
+6
-6
nixos/tests/prometheus-exporters.nix
+6
-6
nixos/tests/prometheus-exporters.nix
·········
+1
-1
nixos/tests/roundcube.nix
+1
-1
nixos/tests/roundcube.nix
···
+1
-1
nixos/tests/sftpgo.nix
+1
-1
nixos/tests/sftpgo.nix
+1
-1
nixos/tests/tandoor-recipes.nix
+1
-1
nixos/tests/tandoor-recipes.nix
+1
-1
nixos/tests/vault-postgresql.nix
+1
-1
nixos/tests/vault-postgresql.nix
+1
-1
nixos/tests/vaultwarden.nix
+1
-1
nixos/tests/vaultwarden.nix
+1
-1
nixos/tests/web-apps/mastodon/remote-databases.nix
+1
-1
nixos/tests/web-apps/mastodon/remote-databases.nix
···
+1
-1
nixos/tests/web-apps/mastodon/standard.nix
+1
-1
nixos/tests/web-apps/mastodon/standard.nix
···
+1
-1
nixos/tests/web-apps/peertube.nix
+1
-1
nixos/tests/web-apps/peertube.nix
+2
-2
nixos/tests/wiki-js.nix
+2
-2
nixos/tests/wiki-js.nix
+1
-1
nixos/tests/zammad.nix
+1
-1
nixos/tests/zammad.nix
···