summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/databases
AgeCommit message (Collapse)Author
11 daysMerge pull request #316977 from eclairevoyant/fix-mkEnableOptionSandro
treewide: fix mkEnableOption usage
11 daystreewide: remove jonringer as package maintainerPaul Meyer
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-06-14postgresql: add readme with eol-policyWolfgang Walther
This was discussed and agreed on in [1]. [1]: https://github.com/NixOS/nixpkgs/pull/310580#discussion_r1597284693
2024-06-14treewide: fix mkEnableOption usageéclairevoyant
2024-05-01Merge master into staging-nextgithub-actions[bot]
2024-05-01nixos/postgresql: Remove toplevel `with lib;`Tom Hubrecht
2024-04-29Merge master into staging-nextgithub-actions[bot]
2024-04-28nixos/redis: don't disable transparent hugepagesSandro Jäckel
Since https://github.com/redis/redis/pull/4001 included in 6.2.0 transparent hugepages works when being set to madvise which is the NixOS and upstream recommended default.
2024-04-28nixos/redis: enable vmOverCommit by default as recommended by redis itselfSandro Jäckel
> WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. > Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. > To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2024-04-19Merge pull request #293996 from wolfgangwalther/postgresql-cleanupMaximilian Bosch
postgresql: more cleanup
2024-04-13nixos: remove all uses of lib.mdDocstuebinm
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
2024-04-12Merge pull request #301804 from helsinki-systems/init/keydbAleksana
keydb: init at 6.3.4
2024-04-11keydb: init at 6.3.4Simon Hauser
2024-04-09nixos: improve many 'enable' descriptionsBjørn Forsman
2024-04-04nixos/postgresql: fix enableJIT = falseWolfgang Walther
The enableJIT = true case was fixed in #221851 or e2fb65175228a992f196f3b1700a53e18602e7f6 respectively. However this did not take the case into consideration, when doing this: services.postgresql = { enable = true; enableJIT = false; package = pkgs.postgresql_15_jit; }; If enableJIT is treated as the source of truth, then this should indeed cause JIT to be disabled, which this commit does.
2024-03-30nixos/postgresql: turn `settings` into a submoduleMaximilian Bosch
The main idea behind that was to be able to do more sophisticated merging for stuff that goes into `postgresql.conf`: `shared_preload_libraries` is a comma-separated list in a `types.str` and thus not mergeable. With this change, the option accepts both a comma-separated string xor a list of strings. This can be implemented rather quick using `coercedTo` + freeform modules. The interface still behaves equally, but it allows to merge declarations for this option together. One side-effect was that I had to change the `attrsOf (oneOf ...)` part into a submodule to allow declaring options for certain things. While at it, I decided to move `log_line_prefix` and `port` into this structure as well.
2024-03-28treewide: Fix all Nix ASTs in all markdown filesJanne Heß
This allows for correct highlighting and maybe future automatic formatting. The AST was verified to work with nixfmt only.
2024-03-28treewide: Mark Nix blocks in markdown as NixJanne Heß
This should help us with highlighting and future formatting.
2024-03-15postgresql: refactor to remove "this" argumentWolfgang Walther
This was proposed by abbradar in #150801, but left out of the follow up PR #221851 by Ma27 to reduce the size of the diff. Compared to the initial proposal this includes the callPackage call in the recursion, which avoids breaking the withJIT/withoutJIT helpers. In terms of nixpkgs, this is a pure refactor, no derivations change. However, this makes downstream expressions like the following possible: (postgresql.override { jitSupport = true; }).pkgs.postgis This would have not worked before without passing another "this" argument, which is error prone as can be seen in this example: https://github.com/PostgREST/postgrest/pull/3222/files
2024-03-15postgresql: refactor to pass jitSupport/llvm via scope instead of passthruWolfgang Walther
This makes it less error-prone to use the llvm package in extensions, because it will always match the package used by the postgresql derivation itself. Previously, you could've accidentally used llvm instead of postgresql.llvm with a different result.
2024-03-11nixos/lldap: set service `UMask=0027` and `StateDirectoryMode=0750`emilylange
While `/var/lib/lldap` isn't technically accessible by unprivileged users thanks to `DynamicUser=true`, a user might prefer and change it to `DynamicUser=false`. There is currently also a PR open that intends to make `DynamicUser` configurable via module option. As such, `jwt_secret_file`, if bootstrapped by the service start procedure, might be rendered world-readable due to its permissions (`0644/-rw-r--r--`) defaulting to the service's umask (`022`) and `/var/lib/lldap` to `0755/drwxr-xr-x` due to `StateDirectoryMode=0755`. This would usually be fixed by using `(umask 027; openssl ...)` instead of just `openssl ...`. However, it was found that another file (`users.db`), this time bootstrapped by `lldap` itself, also had insufficient permissions (`0644/-rw-r--r--`) inherited by the global umask and would be left world-readable as well. Due to this, we instead change the service's to `027`. And to lower the impact for already bootstrapped files on existing instances like `users.db`, set `StateDirectoryMode=0750`.
2024-03-11nixos/lldap: bootstrap `jwt_secret` if not providedemilylange
If not provided, lldap defaults to `secretjwtsecret` as value which is hardcoded in the code base. See https://github.com/lldap/lldap/blob/v0.5.0/server/src/infra/configuration.rs#L76-L77 This is really bad, because it is trivially easy to generate an admin access token/cookie as attacker, if a `jwt_secret` is known.
2024-03-08Merge pull request #291581 from Luflosi/nixos/memcached/clarify-settingWeijia Wang
nixos/memcached: clarify behaviour of `enableUnixSocket`
2024-03-07Merge pull request #287602 from Ma27/drop-postgres-ensurePermissionsMaximilian Bosch
nixos/postgresql: drop ensurePermissions option
2024-02-26nixos/memcached: clarify behaviour of `enableUnixSocket`Luflosi
Let's make it clear that enabling this option will disable listening on an IP address and port.
2024-02-19Merge pull request #285866 from 999eagle/feat/pgbouncer-systemdSandro
2024-02-15nixos/pgbouncer: fix openFirewall optionSophie Tauchert
2024-02-15nixos/pgbouncer: only depend on postgresql.service when enabled and use notifySophie Tauchert
See also the upstream service file: https://github.com/pgbouncer/pgbouncer/blob/e6ce619785c93392794976c1e936e8c9f589a5ad/etc/pgbouncer.service
2024-02-12nixos/postgresql: drop ensurePermissions optionMaximilian Bosch
...effectively what was planned already in #266270, but it was too late because the branches were restricted and didn't allow any breaking changes anymore. It also suffers from the same issue that we already had when discussing this the last time[1] when `ensureDBOwnership` was ultimately introduced as band-aid fix: newly created users don't get CREATE permission on the `public` schema anymore (since psql 15), even with `ALL PRIVILEGES`. If one's use-case is more sophisticated than having a single owner, it's questionable anyways if this module is the correct tool since permissions aren't dropped on a change to this option or a removal which is pretty surprising in the context of NixOS. [1] https://github.com/NixOS/nixpkgs/pull/266270
2024-02-11nixos/mysql: Use notify service type for MySQL >= 8.0Josh Hoffer
2024-02-11nixos/mysql: remove MySQL fixed 30 second timeoutJosh Hoffer
Removed hard coded timeout in postScript, allow using more general systemd TimeoutStartSec instead.
2024-02-05Merge pull request #279268 from superherointj/etcd-fix-firewall-startupWeijia Wang
nixos/etcd: fixes etcd failing to start at boot and add openFirewall option
2024-02-05Merge pull request #239785 from milibopp/neo4j-5.9.0Weijia Wang
neo4j: 4.4.11 -> 5.9.0
2024-01-26nixos/etcd: fix etcd category from misc to databasessuperherointj
2024-01-23Merge pull request #279511 from DanielSidhion/tigerbeetle-servicea-n-n-a-l-e-e
nixos/tigerbeetle: init module
2024-01-19nixos/tigerbeetle: init moduleDS
2024-01-19Merge pull request #267327 from bbenno/fix/nixos-firebirdPeder Bergebakken Sundt
nixos/firebird: fix coerce error
2024-01-19nixos: fix a bunch of services missing dep on network-online.targetJade Lovelace
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-14Merge pull request #272556 from SuperSandro2000/influxdb-restartNick Cao
nixos/influxdb: restart on failure
2024-01-05neo4j: 4.4.11 -> 5.9.0Emilia Bopp
2023-12-28nixos/aerospike: use NixOS option instead of custom scriptLuflosi
Since 2c5abd89c7e917acde9077fc4d12596e35b73e17 setting the option `boot.kernel.sysctl."net.core.rmem_max"` no longer has any downsides compared to what was previously used. Since 439350753ed2e27b0aa4fa1cfdf3ea80ea344644 the same is also true for `boot.kernel.sysctl."net.core.wmem_max"`.
2023-12-15Merge pull request #257504 from SuperSandro2000/postgres-docThomas Gerbet
nixos/postgresql: point doc link to current like all others
2023-12-08nixos/postgresql: take extraPlugins packageset from package optionSandro Jäckel
This allows to reuse the extraPlugins option in other context's for example an upgrade script.
2023-12-06nixos/influxdb: restart on failureSandro Jäckel
2023-11-30treewide: replace `mkPackageOptionMD` with `mkPackageOption`h7x4
2023-11-30Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoptionWeijia Wang
treewide: use `mkPackageOption`
2023-11-27Merge pull request #268634 from tie/redis-restrict-address-familiesMario Rodas
nixos/redis: loosen systemd address family restrictions
2023-11-27treewide: use `mkPackageOption`h7x4
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-20nixos/postgresql: point doc link to current like all othersSandro Jäckel
2023-11-20nixos/postgresql: fix mentioned settings in ensurePermissions warningsSandro