···104104105105- [eris-server](https://codeberg.org/eris/eris-go). [ERIS](https://eris.codeberg.page/) is an encoding for immutable storage and this server provides block exchange as well as content decoding over HTTP and through a FUSE file-system. Available as [services.eris-server](#opt-services.eris-server.enable).
106106107107+- [forgejo](https://forgejo.org/), a git forge. Previously deployed as a drop-in replacement package in the [gitea module](#opt-services.gitea.package). Available as [services.forgejo](#opt-services.forgejo.enable). See migration instructions in the [NixOS manual](#module-forgejo) on how to migrate your forgejo instance using [`services.gitea.package = pkgs.forgejo`](#opt-services.gitea.package) to [`services.forgejo`](#opt-services.forgejo.enable).
108108+107109- hardware/infiniband.nix adds infiniband subnet manager support using an [opensm](https://github.com/linux-rdma/opensm) systemd-template service, instantiated on card guids. The module also adds kernel modules and cli tooling to help administrators debug and measure performance. Available as [hardware.infiniband.enable](#opt-hardware.infiniband.enable).
108110109111- [zwave-js](https://github.com/zwave-js/zwave-js-server), a small server wrapper around Z-Wave JS to access it via a WebSocket. Available as [services.zwave-js](#opt-services.zwave-js.enable).
···142144- [c2FmZQ](https://github.com/c2FmZQ/c2FmZQ/), an application that can securely encrypt, store, and share files, including but not limited to pictures and videos. Available as [services.c2fmzq-server](#opt-services.c2fmzq-server.enable).
143145144146## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
147147+148148+- `services.postgresql.ensurePermissions` has been deprecated in favor of `services.postgresql.ensureUsers.*.ensureDBOwnership` which simplifies the setup of database owned by a certain system user
149149+ in local database contexts (which make use of peer authentication via UNIX sockets), migration guidelines were provided in the NixOS manual, please refer to them if you are affected by a PostgreSQL 15 changing the way `GRANT ALL PRIVILEGES` is working. `services.postgresql.ensurePermissions` will be removed in 24.05. All NixOS modules were migrated using one of the strategy, e.g. `ensureDBOwnership` or `postStart`. More about this situation can be learnt in https://github.com/NixOS/nixpkgs/pull/266270.
145150146151- `network-online.target` has been fixed to no longer time out for systems with `networking.useDHCP = true` and `networking.useNetworkd = true`.
147152 Workarounds for this can be removed.
···3939services.postgresql.dataDir = "/data/postgresql";
4040```
41414242+## Initializing {#module-services-postgres-initializing}
4343+4444+As of NixOS 23.11,
4545+`services.postgresql.ensureUsers.*.ensurePermissions` has been
4646+deprecated, after a change to default permissions in PostgreSQL 15
4747+invalidated most of its previous use cases:
4848+4949+- In psql < 15, `ALL PRIVILEGES` used to include `CREATE TABLE`, where
5050+ in psql >= 15 that would be a separate permission
5151+- psql >= 15 instead gives only the database owner create permissions
5252+- Even on psql < 15 (or databases migrated to >= 15), it is
5353+ recommended to manually assign permissions along these lines
5454+ - https://www.postgresql.org/docs/release/15.0/
5555+ - https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PRIV
5656+5757+### Assigning ownership {#module-services-postgres-initializing-ownership}
5858+5959+Usually, the database owner should be a database user of the same
6060+name. This can be done with
6161+`services.postgresql.ensureUsers.*.ensureDBOwnership = true;`.
6262+6363+If the database user name equals the connecting system user name,
6464+postgres by default will accept a passwordless connection via unix
6565+domain socket. This makes it possible to run many postgres-backed
6666+services without creating any database secrets at all
6767+6868+### Assigning extra permissions {#module-services-postgres-initializing-extra-permissions}
6969+7070+For many cases, it will be enough to have the database user be the
7171+owner. Until `services.postgresql.ensureUsers.*.ensurePermissions` has
7272+been re-thought, if more users need access to the database, please use
7373+one of the following approaches:
7474+7575+**WARNING:** `services.postgresql.initialScript` is not recommended
7676+for `ensurePermissions` replacement, as that is *only run on first
7777+start of PostgreSQL*.
7878+7979+**NOTE:** all of these methods may be obsoleted, when `ensure*` is
8080+reworked, but it is expected that they will stay viable for running
8181+database migrations.
8282+8383+**NOTE:** please make sure that any added migrations are idempotent (re-runnable).
8484+8585+#### as superuser {#module-services-postgres-initializing-extra-permissions-superuser}
8686+8787+**Advantage:** compatible with postgres < 15, because it's run
8888+as the database superuser `postgres`.
8989+9090+##### in database `postStart` {#module-services-postgres-initializing-extra-permissions-superuser-post-start}
9191+9292+**Disadvantage:** need to take care of ordering yourself. In this
9393+example, `mkAfter` ensures that permissions are assigned after any
9494+databases from `ensureDatabases` and `extraUser1` from `ensureUsers`
9595+are already created.
9696+9797+```nix
9898+ systemd.services.postgresql.postStart = lib.mkAfter ''
9999+ $PSQL service1 -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
100100+ $PSQL service1 -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
101101+ # ....
102102+ '';
103103+```
104104+105105+##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-superuser-oneshot}
106106+107107+```nix
108108+ systemd.services."migrate-service1-db1" = {
109109+ serviceConfig.Type = "oneshot";
110110+ requiredBy = "service1.service";
111111+ before = "service1.service";
112112+ after = "postgresql.service";
113113+ serviceConfig.User = "postgres";
114114+ environment.PSQL = "psql --port=${toString services.postgresql.port}";
115115+ path = [ postgresql ];
116116+ script = ''
117117+ $PSQL service1 -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
118118+ $PSQL service1 -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
119119+ # ....
120120+ '';
121121+ };
122122+```
123123+124124+#### as service user {#module-services-postgres-initializing-extra-permissions-service-user}
125125+126126+**Advantage:** re-uses systemd's dependency ordering;
127127+128128+**Disadvantage:** relies on service user having grant permission. To be combined with `ensureDBOwnership`.
129129+130130+##### in service `preStart` {#module-services-postgres-initializing-extra-permissions-service-user-pre-start}
131131+132132+```nix
133133+ environment.PSQL = "psql --port=${toString services.postgresql.port}";
134134+ path = [ postgresql ];
135135+ systemd.services."service1".preStart = ''
136136+ $PSQL -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
137137+ $PSQL -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
138138+ # ....
139139+ '';
140140+```
141141+142142+##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-service-user-oneshot}
143143+144144+```nix
145145+ systemd.services."migrate-service1-db1" = {
146146+ serviceConfig.Type = "oneshot";
147147+ requiredBy = "service1.service";
148148+ before = "service1.service";
149149+ after = "postgresql.service";
150150+ serviceConfig.User = "service1";
151151+ environment.PSQL = "psql --port=${toString services.postgresql.port}";
152152+ path = [ postgresql ];
153153+ script = ''
154154+ $PSQL -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
155155+ $PSQL -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
156156+ # ....
157157+ '';
158158+ };
159159+```
160160+42161## Upgrading {#module-services-postgres-upgrading}
4316244163::: {.note}
+47-11
nixos/modules/services/databases/postgresql.nix
···168168 ensurePermissions = mkOption {
169169 type = types.attrsOf types.str;
170170 default = {};
171171+ visible = false; # This option has been deprecated.
171172 description = lib.mdDoc ''
173173+ This option is DEPRECATED and should not be used in nixpkgs anymore,
174174+ use `ensureDBOwnership` instead. It can also break with newer
175175+ versions of PostgreSQL (≥ 15).
176176+172177 Permissions to ensure for the user, specified as an attribute set.
173178 The attribute names specify the database and tables to grant the permissions for.
174179 The attribute values specify the permissions to grant. You may specify one or
···184189 "DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
185190 "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
186191 }
192192+ '';
193193+ };
194194+195195+ ensureDBOwnership = mkOption {
196196+ type = types.bool;
197197+ default = false;
198198+ description = mdDoc ''
199199+ Grants the user ownership to a database with the same name.
200200+ This database must be defined manually in
201201+ [](#opt-services.postgresql.ensureDatabases).
187202 '';
188203 };
189204···338353 });
339354 default = [];
340355 description = lib.mdDoc ''
341341- Ensures that the specified users exist and have at least the ensured permissions.
356356+ Ensures that the specified users exist.
342357 The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
343358 same name only, and that without the need for a password.
344344- This option will never delete existing users or remove permissions, especially not when the value of this
345345- option is changed. This means that users created and permissions assigned once through this option or
346346- otherwise have to be removed manually.
359359+ This option will never delete existing users or remove DB ownership of databases
360360+ once granted with `ensureDBOwnership = true;`. This means that this must be
361361+ cleaned up manually when changing after changing the config in here.
347362 '';
348363 example = literalExpression ''
349364 [
350365 {
351366 name = "nextcloud";
352352- ensurePermissions = {
353353- "DATABASE nextcloud" = "ALL PRIVILEGES";
354354- };
355367 }
356368 {
357369 name = "superuser";
358358- ensurePermissions = {
359359- "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
360360- };
370370+ ensureDBOwnership = true;
361371 }
362372 ]
363373 '';
···445455446456 config = mkIf cfg.enable {
447457458458+ assertions = map ({ name, ensureDBOwnership, ... }: {
459459+ assertion = ensureDBOwnership -> builtins.elem name cfg.ensureDatabases;
460460+ message = ''
461461+ For each database user defined with `services.postgresql.ensureUsers` and
462462+ `ensureDBOwnership = true;`, a database with the same name must be defined
463463+ in `services.postgresql.ensureDatabases`.
464464+465465+ Offender: ${name} has not been found among databases.
466466+ '';
467467+ }) cfg.ensureUsers;
468468+ # `ensurePermissions` is now deprecated, let's avoid it.
469469+ warnings = lib.optional (any ({ ensurePermissions, ... }: ensurePermissions != {}) cfg.ensureUsers) "
470470+ `services.postgresql.*.ensurePermissions` is used in your expressions,
471471+ this option is known to be broken with newer PostgreSQL versions,
472472+ consider migrating to `services.postgresql.*.ensureDBOwnership` or
473473+ consult the release notes or manual for more migration guidelines.
474474+475475+ This option will be removed in NixOS 24.05 unless it sees significant
476476+ maintenance improvements.
477477+ ";
478478+448479 services.postgresql.settings =
449480 {
450481 hba_file = "${pkgs.writeText "pg_hba.conf" cfg.authentication}";
···556587 ${
557588 concatMapStrings
558589 (user:
559559- let
590590+ let
560591 userPermissions = concatStringsSep "\n"
561592 (mapAttrsToList
562593 (database: permission: ''$PSQL -tAc 'GRANT ${permission} ON ${database} TO "${user.name}"' '')
563594 user.ensurePermissions
564595 );
596596+ dbOwnershipStmt = optionalString
597597+ user.ensureDBOwnership
598598+ ''$PSQL -tAc 'ALTER DATABASE "${user.name}" OWNER TO "${user.name}";' '';
565599566600 filteredClauses = filterAttrs (name: value: value != null) user.ensureClauses;
567601···572606 $PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc 'CREATE USER "${user.name}"'
573607 ${userPermissions}
574608 ${userClauses}
609609+610610+ ${dbOwnershipStmt}
575611 ''
576612 )
577613 cfg.ensureUsers
+2-2
nixos/modules/services/development/zammad.nix
···204204205205 assertions = [
206206 {
207207- assertion = cfg.database.createLocally -> cfg.database.user == "zammad";
207207+ assertion = cfg.database.createLocally -> cfg.database.user == "zammad" && cfg.database.name == "zammad";
208208 message = "services.zammad.database.user must be set to \"zammad\" if services.zammad.database.createLocally is set to true";
209209 }
210210 {
···231231 ensureUsers = [
232232 {
233233 name = cfg.database.user;
234234- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
234234+ ensureDBOwnership = true;
235235 }
236236 ];
237237 };
···11+# Forgejo {#module-forgejo}
22+33+Forgejo is a soft-fork of gitea, with strong community focus, as well
44+as on self-hosting and federation. [Codeberg](https://codeberg.org) is
55+deployed from it.
66+77+See [upstream docs](https://forgejo.org/docs/latest/).
88+99+The method of choice for running forgejo is using [`services.forgejo`](#opt-services.forgejo.enable).
1010+1111+::: {.warning}
1212+Running forgejo using `services.gitea.package = pkgs.forgejo` is no longer
1313+recommended.
1414+If you experience issues with your instance using `services.gitea`,
1515+**DO NOT** report them to the `services.gitea` module maintainers.
1616+**DO** report them to the `services.forgejo` module maintainers instead.
1717+:::
1818+1919+## Migration from Gitea {#module-forgejo-migration-gitea}
2020+2121+::: {.note}
2222+Migrating is, while not strictly necessary at this point, highly recommended.
2323+Both modules and projects are likely to divide further with each release.
2424+Which might lead to an even more involved migration.
2525+:::
2626+2727+### Full-Migration {#module-forgejo-migration-gitea-default}
2828+2929+This will migrate the state directory (data), rename and chown the database and
3030+delete the gitea user.
3131+3232+::: {.note}
3333+This will also change the git remote ssh-url user from `gitea@` to `forgejo@`,
3434+when using the host's openssh server (default) instead of the integrated one.
3535+:::
3636+3737+Instructions for PostgreSQL (default). Adapt accordingly for other databases:
3838+3939+```sh
4040+systemctl stop gitea
4141+mv /var/lib/gitea /var/lib/forgejo
4242+runuser -u postgres -- psql -c '
4343+ ALTER USER gitea RENAME TO forgejo;
4444+ ALTER DATABASE gitea RENAME TO forgejo;
4545+'
4646+nixos-rebuild switch
4747+systemctl stop forgejo
4848+chown -R forgejo:forgejo /var/lib/forgejo
4949+systemctl restart forgejo
5050+```
5151+5252+### Alternatively, keeping the gitea user {#module-forgejo-migration-gitea-impersonate}
5353+5454+Alternatively, instead of renaming the database, copying the state folder and
5555+changing the user, the forgejo module can be set up to re-use the old storage
5656+locations and database, instead of having to copy or rename them.
5757+Make sure to disable `services.gitea`, when doing this.
5858+5959+```nix
6060+services.gitea.enable = false;
6161+6262+services.forgejo = {
6363+ enable = true;
6464+ user = "gitea";
6565+ group = "gitea";
6666+ stateDir = "/var/lib/gitea";
6767+ database.name = "gitea";
6868+ database.user = "gitea";
6969+};
7070+7171+users.users,gitea = {
7272+ home = "/var/lib/gitea";
7373+ useDefaultShell = true;
7474+ group = "gitea";
7575+ isSystemUser = true;
7676+};
7777+7878+users.groups.gitea = {};
7979+```
+10-1
nixos/modules/services/misc/forgejo.nix
···357357 assertion = cfg.database.createDatabase -> useSqlite || cfg.database.user == cfg.user;
358358 message = "services.forgejo.database.user must match services.forgejo.user if the database is to be automatically provisioned";
359359 }
360360+ { assertion = cfg.database.createDatabase && usePostgresql -> cfg.database.user == cfg.database.name;
361361+ message = ''
362362+ When creating a database via NixOS, the db user and db name must be equal!
363363+ If you already have an existing DB+user and this assertion is new, you can safely set
364364+ `services.forgejo.createDatabase` to `false` because removal of `ensureUsers`
365365+ and `ensureDatabases` doesn't have any effect.
366366+ '';
367367+ }
360368 ];
361369362370 services.forgejo.settings = {
···423431 ensureUsers = [
424432 {
425433 name = cfg.database.user;
426426- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
434434+ ensureDBOwnership = true;
427435 }
428436 ];
429437 };
···677685 };
678686 };
679687688688+ meta.doc = ./forgejo.md;
680689 meta.maintainers = with lib.maintainers; [ bendlas emilylange ];
681690}
+9-1
nixos/modules/services/misc/gitea.nix
···394394 { assertion = cfg.database.createDatabase -> useSqlite || cfg.database.user == cfg.user;
395395 message = "services.gitea.database.user must match services.gitea.user if the database is to be automatically provisioned";
396396 }
397397+ { assertion = cfg.database.createDatabase && usePostgresql -> cfg.database.user == cfg.database.name;
398398+ message = ''
399399+ When creating a database via NixOS, the db user and db name must be equal!
400400+ If you already have an existing DB+user and this assertion is new, you can safely set
401401+ `services.gitea.createDatabase` to `false` because removal of `ensureUsers`
402402+ and `ensureDatabases` doesn't have any effect.
403403+ '';
404404+ }
397405 ];
398406399407 services.gitea.settings = {
···461469 ensureDatabases = [ cfg.database.name ];
462470 ensureUsers = [
463471 { name = cfg.database.user;
464464- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
472472+ ensureDBOwnership = true;
465473 }
466474 ];
467475 };
+2-2
nixos/modules/services/misc/redmine.nix
···267267 { assertion = cfg.database.passwordFile != null || cfg.database.socket != null;
268268 message = "one of services.redmine.database.socket or services.redmine.database.passwordFile must be set";
269269 }
270270- { assertion = cfg.database.createLocally -> cfg.database.user == cfg.user;
270270+ { assertion = cfg.database.createLocally -> cfg.database.user == cfg.user && cfg.database.user == cfg.database.name;
271271 message = "services.redmine.database.user must be set to ${cfg.user} if services.redmine.database.createLocally is set true";
272272 }
273273 { assertion = cfg.database.createLocally -> cfg.database.socket != null;
···315315 ensureDatabases = [ cfg.database.name ];
316316 ensureUsers = [
317317 { name = cfg.database.user;
318318- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
318318+ ensureDBOwnership = true;
319319 }
320320 ];
321321 };
+7-3
nixos/modules/services/misc/sourcehut/service.nix
···249249 ensureDatabases = [ srvCfg.postgresql.database ];
250250 ensureUsers = map (name: {
251251 inherit name;
252252- ensurePermissions = { "DATABASE \"${srvCfg.postgresql.database}\"" = "ALL PRIVILEGES"; };
252252+ # We don't use it because we have a special default database name with dots.
253253+ # TODO(for maintainers of sourcehut): migrate away from custom preStart script.
254254+ ensureDBOwnership = false;
253255 }) [srvCfg.user];
254256 };
257257+255258256259 services.sourcehut.settings = mkMerge [
257260 {
···378381 extraService
379382 ])) extraServices)
380383381381- # Work around 'pq: permission denied for schema public' with postgres v15, until a
382382- # solution for `services.postgresql.ensureUsers` is found.
384384+ # Work around 'pq: permission denied for schema public' with postgres v15.
383385 # See https://github.com/NixOS/nixpkgs/issues/216989
384386 # Workaround taken from nixos/forgejo: https://github.com/NixOS/nixpkgs/pull/262741
387387+ # TODO(to maintainers of sourcehut): please migrate away from this workaround
388388+ # by migrating away from database name defaults with dots.
385389 (lib.mkIf (
386390 cfg.postgresql.enable
387391 && lib.strings.versionAtLeast config.services.postgresql.package.version "15.0"
···109109 # Default to using the local database if we create it
110110 services.invidious.database.host = lib.mkDefault null;
111111112112+113113+ # TODO(raitobezarius to maintainers of invidious): I strongly advise to clean up the kemal specific
114114+ # thing for 24.05 and use `ensureDBOwnership`.
115115+ # See https://github.com/NixOS/nixpkgs/issues/216989
116116+ systemd.services.postgresql.postStart = lib.mkAfter ''
117117+ $PSQL -tAc 'ALTER DATABASE "${cfg.settings.db.dbname}" OWNER TO "${cfg.settings.db.user}";'
118118+ '';
112119 services.postgresql = {
113120 enable = true;
121121+ ensureUsers = lib.singleton { name = cfg.settings.db.user; ensureDBOwnership = false; };
114122 ensureDatabases = lib.singleton cfg.settings.db.dbname;
115115- ensureUsers = lib.singleton {
116116- name = cfg.settings.db.user;
117117- ensurePermissions = {
118118- "DATABASE ${cfg.settings.db.dbname}" = "ALL PRIVILEGES";
119119- };
120120- };
121123 # This is only needed because the unix user invidious isn't the same as
122124 # the database user. This tells postgres to map one to the other.
123125 identMap = ''
···136138 documentation = [ "https://docs.invidious.io/Database-Information-and-Maintenance.md" ];
137139 startAt = lib.mkDefault "weekly";
138140 path = [ config.services.postgresql.package ];
141141+ after = [ "postgresql.service" ];
139142 script = ''
140143 psql ${cfg.settings.db.dbname} ${cfg.settings.db.user} -c "DELETE FROM nonces * WHERE expire < current_timestamp"
141144 psql ${cfg.settings.db.dbname} ${cfg.settings.db.user} -c "TRUNCATE TABLE videos"
···347347348348 # Taken from here:
349349 # https://framagit.org/framasoft/mobilizon/-/blob/1.1.0/priv/templates/setup_db.eex
350350+ # TODO(to maintainers of mobilizon): the owner database alteration is necessary
351351+ # as PostgreSQL 15 changed their behaviors w.r.t. to privileges.
352352+ # See https://github.com/NixOS/nixpkgs/issues/216989 to get rid
353353+ # of that workaround.
350354 script =
351355 ''
352356 psql "${repoSettings.database}" -c "\
353357 CREATE EXTENSION IF NOT EXISTS postgis; \
354358 CREATE EXTENSION IF NOT EXISTS pg_trgm; \
355359 CREATE EXTENSION IF NOT EXISTS unaccent;"
360360+ psql -tAc 'ALTER DATABASE "${repoSettings.database}" OWNER TO "${dbUser}";'
361361+356362 '';
357363358364 serviceConfig = {
···372378 ensureUsers = [
373379 {
374380 name = dbUser;
375375- ensurePermissions = {
376376- "DATABASE \"${repoSettings.database}\"" = "ALL PRIVILEGES";
377377- };
381381+ # Given that `dbUser` is potentially arbitrarily custom, we will perform
382382+ # manual fixups in mobilizon-postgres.
383383+ # TODO(to maintainers of mobilizon): Feel free to simplify your setup by using `ensureDBOwnership`.
384384+ ensureDBOwnership = false;
378385 }
379386 ];
380387 extraPlugins = with postgresql.pkgs; [ postgis ];
+2-2
nixos/modules/services/web-apps/moodle.nix
···194194 config = mkIf cfg.enable {
195195196196 assertions = [
197197- { assertion = cfg.database.createLocally -> cfg.database.user == user;
197197+ { assertion = cfg.database.createLocally -> cfg.database.user == user && cfg.database.user == cfg.database.name;
198198 message = "services.moodle.database.user must be set to ${user} if services.moodle.database.createLocally is set true";
199199 }
200200 { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
···220220 ensureDatabases = [ cfg.database.name ];
221221 ensureUsers = [
222222 { name = cfg.database.user;
223223- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
223223+ ensureDBOwnership = true;
224224 }
225225 ];
226226 };
···529529 assertion = cfg.database.password != null -> cfg.database.passwordFile == null;
530530 message = "Cannot set both password and passwordFile";
531531 }
532532+ {
533533+ assertion = cfg.database.createLocally -> cfg.database.name == cfg.user && cfg.database.user == cfg.user;
534534+ message = ''
535535+ When creating a database via NixOS, the db user and db name must be equal!
536536+ If you already have an existing DB+user and this assertion is new, you can safely set
537537+ `services.tt-rss.database.createLocally` to `false` because removal of `ensureUsers`
538538+ and `ensureDatabases` doesn't have any effect.
539539+ '';
540540+ }
532541 ];
533542534543 services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") {
···632641 enable = mkDefault true;
633642 ensureDatabases = [ cfg.database.name ];
634643 ensureUsers = [
635635- { name = cfg.user;
636636- ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
644644+ { name = cfg.database.user;
645645+ ensureDBOwnership = true;
637646 }
638647 ];
639648 };
···7788 # Please keep the version x.y.0.z and do not update to x.y.76.z because the
99 # source of the latter disappears much faster.
1010- version = "8.106.0.212";
1010+ version = "8.108.0.205";
11111212 rpath = lib.makeLibraryPath [
1313 alsa-lib
···6868 "https://mirror.cs.uchicago.edu/skype/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
6969 "https://web.archive.org/web/https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
7070 ];
7171- sha256 = "sha256-TlqhCj5nyL8SEo3M6ahPLYOTDrEjHvxtu1qFSR8LtkM=";
7171+ sha256 = "sha256-9V+/tTFco69NkCeswbGobr3ZxcS3q+Zd7fiei4N8uTY=";
7272 }
7373 else
7474 throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
···4141 license = licenses.gpl3Only;
4242 # darwin gives hash mismatch in source, probably because of file names differing only in case
4343 platforms = platforms.linux;
4444- maintainers = with maintainers; [ romildo fortuneteller2k ];
4444+ maintainers = with maintainers; [ romildo moni ];
4545 };
4646}
···5757# Raise an error if two packages are installed with the same name
5858# TODO: For cross we probably need a different PYTHONPATH, or not
5959# add the runtime deps until after buildPhase.
6060-, catchConflicts ? (python.stdenv.hostPlatform == python.stdenv.buildPlatform)
6060+# FIXME: disabled for Python 2 because broken
6161+, catchConflicts ? false
61626263# Additional arguments to pass to the makeWrapper function, which wraps
6364# generated binaries.
···2828 "-Ddocs=disabled"
2929 ];
30303131+ env = lib.optionalAttrs stdenv.isDarwin {
3232+ # Do not fail the build on clang-16/darwin.
3333+ # TODO: drop the workaround when upstream fixes it in:
3434+ # https://gitlab.com/drobilla/zix/-/issues/3
3535+ NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
3636+ };
3737+3138 meta = with lib; {
3239 description = "A lightweight C99 portability and data structure library";
3340 homepage = "https://gitlab.com/drobilla/zix";
···10101111buildGoModule rec {
1212 pname = "fastly";
1313- version = "10.6.2";
1313+ version = "10.6.4";
14141515 src = fetchFromGitHub {
1616 owner = "fastly";
1717 repo = "cli";
1818 rev = "refs/tags/v${version}";
1919- hash = "sha256-j4dqLV1Q17RQczkTqGTh8S8Y6ELqXjWuJRr+xB/x2yE=";
1919+ hash = "sha256-+qBeE7t+d1Es63hUBO9Bcqyc0vtatcJGoYw2GE0JPxQ=";
2020 # The git commit is part of the `fastly version` original output;
2121 # leave that output the same in nixpkgs. Use the `.git` directory
2222 # to retrieve the commit SHA, and remove the directory afterwards,
···3333 "cmd/fastly"
3434 ];
35353636- vendorHash = "sha256-aCekNpf6C5fGIEk0pLkz4hJ6mQfBIzeCsIL6Fxf2QGk=";
3636+ vendorHash = "sha256-Mh737emdQkIoNOAkaTafCoMQnLqXIGMKX6X5ClsmMzc=";
37373838 nativeBuildInputs = [
3939 installShellFiles
+1-1
pkgs/misc/i3a/default.nix
···2424 homepage = "https://git.goral.net.pl/mgoral/i3a";
2525 description = "A set of scripts used for automation of i3 and sway window manager layouts";
2626 license = licenses.gpl3Plus;
2727- maintainers = with maintainers; [ fortuneteller2k ];
2727+ maintainers = with maintainers; [ moni ];
2828 };
2929}
+1-1
pkgs/os-specific/linux/cryptodev/default.nix
···2323 meta = {
2424 description = "Device that allows access to Linux kernel cryptographic drivers";
2525 homepage = "http://cryptodev-linux.org/";
2626- maintainers = with lib.maintainers; [ fortuneteller2k ];
2626+ maintainers = with lib.maintainers; [ moni ];
2727 license = lib.licenses.gpl2Plus;
2828 platforms = lib.platforms.linux;
2929 };
+1-1
pkgs/os-specific/linux/irqbalance/default.nix
···3232 description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
3333 license = licenses.gpl2Only;
3434 platforms = platforms.linux;
3535- maintainers = with maintainers; [ fortuneteller2k ];
3535+ maintainers = with maintainers; [ moni ];
3636 };
3737}
+1-1
pkgs/os-specific/linux/kernel/xanmod-kernels.nix
···44444545 extraMeta = {
4646 branch = lib.versions.majorMinor version;
4747- maintainers = with lib.maintainers; [ fortuneteller2k lovesegfault atemu shawn8901 zzzsy ];
4747+ maintainers = with lib.maintainers; [ moni lovesegfault atemu shawn8901 zzzsy ];
4848 description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience";
4949 broken = stdenv.isAarch64;
5050 };
···1818 meta = with lib; {
1919 description = "Crack and decrypt BLE encryption";
2020 homepage = "https://github.com/mikeryan/crackle";
2121- maintainers = with maintainers; [ fortuneteller2k ];
2121+ maintainers = with maintainers; [ moni ];
2222 license = licenses.bsd2;
2323 };
2424}
+1-1
pkgs/tools/networking/mdk4/default.nix
···2727 meta = with lib; {
2828 description = "A tool that injects data into wireless networks";
2929 homepage = "https://github.com/aircrack-ng/mdk4";
3030- maintainers = with maintainers; [ fortuneteller2k ];
3030+ maintainers = with maintainers; [ moni ];
3131 license = licenses.gpl2Plus;
3232 };
3333}
+1-1
pkgs/tools/networking/redfang/default.nix
···3030 description = "A small proof-of-concept application to find non discoverable bluetooth devices";
3131 homepage = "https://gitlab.com/kalilinux/packages/redfang";
3232 license = licenses.gpl2Only;
3333- maintainers = with maintainers; [ fortuneteller2k ];
3333+ maintainers = with maintainers; [ moni ];
3434 };
3535}