Commit Graph

644 Commits

Author SHA1 Message Date
Weijia Wang
7ece427021
Merge pull request #279268 from superherointj/etcd-fix-firewall-startup
nixos/etcd: fixes etcd failing to start at boot and add openFirewall option
2024-02-05 00:37:09 +01:00
Weijia Wang
e2fb30fabc
Merge pull request #239785 from milibopp/neo4j-5.9.0
neo4j: 4.4.11 -> 5.9.0
2024-02-05 00:21:21 +01:00
superherointj
cbe8e0c980 nixos/etcd: fix etcd category from misc to databases 2024-01-26 16:40:11 -03:00
a-n-n-a-l-e-e
18cc181b9b
Merge pull request #279511 from DanielSidhion/tigerbeetle-service
nixos/tigerbeetle: init module
2024-01-23 23:13:54 -08:00
DS
fdf411fb36 nixos/tigerbeetle: init module 2024-01-19 13:19:27 -08:00
Peder Bergebakken Sundt
c3f2d4a319
Merge pull request #267327 from bbenno/fix/nixos-firebird
nixos/firebird: fix coerce error
2024-01-19 22:12:47 +01:00
Jade Lovelace
6c5ab28fce nixos: fix a bunch of services missing dep on network-online.target
This was done by generating a truly hilarious configuration:

rg 'services\.[^.]+\.enable\t' opts-tags | cut -f1 > allonconfig.nix

The following were not tested due to other evaluation errors. They
should probably be manually audited.
services.amule
services.castopod
services.ceph
services.chatgpt-retrieval-plugin
services.clamsmtp
services.clight
services.dante
services.dex
services.discourse
services.dwm-status
services.engelsystem
services.foundationdb
services.frigate
services.frp
services.grocy
services.guacamole-client
services.hedgedoc
services.home-assistant
services.honk
services.imaginary
services.jitsi-meet
services.kerberos_server
services.limesurvey
services.mastodon
services.mediawiki
services.mobilizon
services.moodle
services.mosquitto
services.nextcloud
services.nullmailer
services.patroni
services.pfix-srsd
services.pgpkeyserver-lite
services.postfixadmin
services.roundcube
services.schleuder
services.self-deploy
services.slskd
services.spacecookie
services.statsd
services.step-ca
services.sympa
services.tsmBackup
services.vdirsyncer
services.vikunja
services.yandex-disk
services.zabbixWeb
2024-01-19 00:11:34 -08:00
Nick Cao
1840316647
Merge pull request #272556 from SuperSandro2000/influxdb-restart
nixos/influxdb: restart on failure
2024-01-14 14:25:21 -05:00
Emilia Bopp
5f6b7a35d6 neo4j: 4.4.11 -> 5.9.0 2024-01-05 18:20:24 +01:00
Luflosi
f88af99311
nixos/aerospike: use NixOS option instead of custom script
Since 2c5abd89c7 setting the option `boot.kernel.sysctl."net.core.rmem_max"` no longer has any downsides compared to what was previously used. Since 439350753e the same is also true for `boot.kernel.sysctl."net.core.wmem_max"`.
2023-12-28 17:41:59 +01:00
Thomas Gerbet
a9da4c2260
Merge pull request #257504 from SuperSandro2000/postgres-doc
nixos/postgresql: point doc link to current like all others
2023-12-15 00:43:13 +01:00
Sandro Jäckel
4fe5824fc7
nixos/postgresql: take extraPlugins packageset from package option
This allows to reuse the extraPlugins option in other context's for
example an upgrade script.
2023-12-08 14:58:18 +01:00
Sandro Jäckel
c8e61256e6
nixos/influxdb: restart on failure 2023-12-06 23:17:29 +01:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
Weijia Wang
feeae486de
Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption
treewide: use `mkPackageOption`
2023-11-30 02:49:30 +01:00
Mario Rodas
3dba8d6fdb
Merge pull request #268634 from tie/redis-restrict-address-families
nixos/redis: loosen systemd address family restrictions
2023-11-27 20:06:29 -05:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Sandro Jäckel
515ce669bc
nixos/postgresql: point doc link to current like all others 2023-11-20 14:44:23 +01:00
Sandro
809f926017
nixos/postgresql: fix mentioned settings in ensurePermissions warnings 2023-11-20 14:42:57 +01:00
Ivan Trubach
5c898bec57 nixos/redis: loosen systemd address family restrictions
Do not assume that port and unixSocket are the only options that affect
address families used by Redis. There are other options, e.g. tls-port,
and also clustered setup that are not covered by the declarative
configuration. Instead of trying to selectively restrict unused address
families based on the configuration, limit address families to IP and
Unix sockets and let users lib.mkForce a stricter sandboxing is needed.

See also
https://docs.redis.com/latest/rs/networking/port-configurations/
2023-11-20 07:11:34 +03:00
Ryan Lahfa
ccfe07c316
Merge pull request #266270 from Ma27/postgresql-ownership-15 2023-11-17 18:02:17 +01:00
Herwig Hochleitner
e7c7d97167
nixos/postgresql: document psql 15 changes (#267238)
* nixos/postgresql: document psql 15 changes

* nixos/postgresql: manual heading ids

* nixos/postgresql: reword warning against initialScript

Co-authored-by: Ryan Lahfa <masterancpp@gmail.com>

* nixos/postgresql: wording PERMISSIONS -> PRIVILEGES

Co-authored-by: Ryan Lahfa <masterancpp@gmail.com>

* nixos/postgresql: document intermediate oneshot / service user method

* nixos/postgresql/docs: clarify security benefits of `ensureDBOwnership`

* nixos/postgresql/docs: service type -> serviceConfig.Type

---------

Co-authored-by: Ryan Lahfa <masterancpp@gmail.com>
2023-11-17 16:06:01 +01:00
Benno Bielmeier
0a620163b9 nixos/firebird: fix coerce error
When `services.firebird.enable` following error is thrown:
  error: cannot coerce an integer to a string

After explicitly cast the port (integer) to string the error disappears.
2023-11-13 23:49:04 +01:00
Raito Bezarius
d57926c0b6 nixos/postgresql: improve the assertions for equality of DB user and DB name
It is hard to figure out which one is offending without the database name.
2023-11-13 17:16:25 +01:00
Raito Bezarius
12797a6a39 nixos/postgresql: restore ensurePermissions and strong-deprecate it
As it is technically a breaking change, we should at least make a strong deprecation
of `ensurePermissions` and leave it in the broken state it is, for out of tree users.

We give them a 6 months notice to migrate away by doing so, which is honest.
In the meantime, we forbid usage of `ensurePermissions` inside of nixpkgs.
2023-11-13 17:16:25 +01:00
Maximilian Bosch
48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
Anthony Roussel
e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Maximilian Bosch
1220a4d4dd
postgresql_11: remove
As described in the release lifecycle docs from postgresql[1], v11 will
stop receiving fixes as of Nov 9 2023. This means it's EOL throughout
the entire lifetime of 23.11, so let's drop it now.

A lot of examples are also referencing postgresql_11. Where it's
sensible, use postgresql_15 as example now to avoid confusion.

This is also handy because the LLVM 16 fix for postgresql is not
available for postgresql 11 ;-)

[1] https://www.postgresql.org/support/versioning/
2023-10-30 10:41:16 +01:00
Julien Malka
5237796f2b nixos/ferretdb: fix broken link to documentation 2023-10-23 16:48:31 +00:00
github-actions[bot]
cfc75eec46
Merge master into staging-next 2023-10-20 18:00:54 +00:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
Alyssa Ross
579ae9b989
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/cirq-core/default.nix
2023-10-16 08:49:23 +00:00
Julien Malka
c54ab7d643 nixos/ferretdb: init 2023-10-16 10:15:30 +02:00
github-actions[bot]
75d4639be3
Merge master into staging-next 2023-10-09 18:00:59 +00:00
Maximilian Bosch
9f1d4b79e3
nixos/postgresql: fix identMap example
This was causing the following warning before when building the manual:

    warning: literalExample is deprecated, use literalExpression instead, or use literalMD for a non-Nix description.

Rather than using `literalExpression`, nothing is used. This option
expects a string and the example is a string, no special handling
required. Both `literalExample` from the docbook ages and
`literalExpression` now are only required if the example is
a Nix expression rather than a value of the option's type.
2023-10-09 17:41:44 +02:00
Jan Tojnar
76a7aa445a Merge branch 'master' into staging-next
Conflicts:
- pkgs/development/python-modules/xdot/default.nix
  between 2f244e3647 and 1a9a257cf7
2023-10-06 23:18:00 +02:00
Artturi
34c738fb3d
Merge pull request #152631 from jonringer/pgmanage-use-package 2023-10-07 00:05:58 +03:00
github-actions[bot]
b7f2311d92
Merge staging-next into staging 2023-09-27 18:01:33 +00:00
Gary Guo
e037977239 postgresql: default to v15 in 23.11 2023-09-27 03:51:06 +02:00
Matthieu Coudron
b53c715e50 services.postgres: add initialScript example 2023-09-18 11:57:58 +02:00
Matthieu Coudron
956a1876aa services.postgresql: add identMap example
to make things clearer
2023-09-18 11:57:58 +02:00
Matthieu Coudron
482619dac7 services.postgres: move the generated statement at the top of the file 2023-09-18 11:57:57 +02:00
happysalada
5ae2b27518 nixos/surrealdb: incorporate beta 10 changes 2023-09-07 08:57:41 +00:00
oddlama
8b5b7def91
nixos/influxdb2: add org, bucket, users and auth provisioning 2023-08-23 14:46:52 +02:00
Nick Cao
a4c6594dcd
nixos/influxdb2: do not load passwordFile and tokenFile when provisioning is disabled 2023-08-18 20:25:53 +08:00
oddlama
b4d718f14a
nixos/influxdb2: add initial setup automation and nixos tests 2023-08-16 14:31:49 +02:00
Matthieu Coudron
6774f3fc04 services.postgresql: fix example 2023-07-27 11:35:55 -05:00
1000101
f63d863fde
nixos/pgbouncer: init (#241578)
Co-authored-by: Marek Mahut <marek.mahut@gmail.com>
2023-07-22 12:49:23 +02:00
Weijia Wang
4b8f7098da foundationdb: cleanup 2023-06-08 14:48:41 +03:00
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00