Commit Graph

661 Commits

Author SHA1 Message Date
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
Yureka
97c8817371
nixos/clickhouse: Notify systemd about successful startup (#232443)
https://github.com/ClickHouse/ClickHouse/pull/43400
https://github.com/ClickHouse/ClickHouse/pull/46613
2023-05-19 00:24:20 +02:00
Robert Hensing
2e2f0d28ea nixos: Use checks instead of extraDependencies
... as appropriate.

This drops a few unnecessary store paths from the system closure.
2023-05-11 21:18:38 +02:00
IndeedNotJames
87ccd1a47b
nixos/lldap: init
Co-authored-by: LongerHV <46924944+LongerHV@users.noreply.github.com>
2023-04-29 21:14:25 +02:00
Kerstin Humm
0b0cc93e79
remove myself (erictapen) from packages which I don't use anymore 2023-04-03 17:07:16 +02:00
Sandro
c2ae278eb8
Merge pull request #221851 from Ma27/postgresql-jit-support
postgresql: implement opt-in JIT support
2023-03-29 13:29:30 +02:00
Maximilian Bosch
e2fb651752
nixos/postgresql: fix enableJIT
Make sure that JIT is actually available when using

    services.postgresql = {
      enable = true;
      enableJIT = true;
      package = pkgs.postgresql_15;
    };

The current behavior is counter-intuitive because the docs state that
`enableJIT = true;` is sufficient even though it wasn't in that case
because the declared package doesn't have the LLVM dependency.

Fixed by using `package.withJIT` if `enableJIT = true;` and
`package.jitSupport` is `false`.

Also updated the postgresql-jit test to test for that case.
2023-03-29 08:39:47 +02:00
Maximilian Bosch
43dbeae02d
postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa
This is useful if your postgresql version is dependant on
`system.stateVersion` and not pinned down manually. Then it's not
necessary to find out which version exactly is in use and define
`package` manually, but just stay with what NixOS provides as default:

    $ nix-instantiate -A postgresql
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv
    $ nix-instantiate -A postgresql_jit
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT.withoutJIT
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv

I.e. you can use postgresql with JIT (for complex queries only[1]) like
this:

    services.postgresql = {
      enable = true;
      enableJIT = true;
    };

Performing a new override instead of re-using the `_jit`-variants for
that has the nice property that overlays for the original package apply
to the JIT-enabled variant, i.e.

    with import ./. {
      overlays = [
        (self: super: {
          postgresql = super.postgresql.overrideAttrs (_: { fnord = "snens"; });
        })
      ];
    };
    postgresql.withJIT.fnord

still gives the string `snens` whereas `postgresql_jit` doesn't have the
attribute `fnord` in its derivation.

[1] https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-JIT-ABOVE-COST
2023-03-29 08:39:46 +02:00
Sandro
86053e5ec2
dgraph: use --prefix to prefix PATH
This is more robust in case PATH is empty or otherwise weird.
2023-03-01 13:55:30 +01:00
Maximilian Bosch
3d53723112
Merge pull request #186660 from aopom/clickhouse-conf
Change clickhouse's module conf directory to permit overrides
2023-02-14 15:58:09 +01:00
pennae
0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
pennae
53fc887582 nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
pennae
bf92eaebe4 nixos/manual: generate module chapters with md-to-db.sh 2023-01-10 10:32:00 +01:00
pennae
23ea73b416 nixos/manual: enable smart quotes for all MD chapters 2023-01-10 10:31:59 +01:00
pennae
453b2bed05 nixos/postgresql: convert manual chapter to MD 2023-01-10 10:31:55 +01:00
pennae
5b012f2c55 nixos/foundationdb: convert manual chapter to MD 2023-01-10 10:31:55 +01:00
pennae
22144ba269 nixos/manual: normalize <package> -> <literal>
markdown can only do <literal>, so normalize to that. without
auto-linking to a package index the distinction is not very useful anyway.
2023-01-10 10:31:52 +01:00
pennae
80a78f2e1e nixos/manual: remove links from program listings
markdown cannot represent those links. remove them all now instead of in
each chapter conversion to keep the diff for each chapter small and more
understandable.
2023-01-10 10:31:52 +01:00
pennae
9da5f12ecf modules: add mkPackageOptionMD
another transitional option factory, like mkAliasOptionModuleMD.
2023-01-05 02:33:13 +01:00
Valentin Gagarin
f782da699e
Merge pull request #206646 from figsoda/typos 2022-12-18 18:27:57 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Robert Hensing
cf150c53f1
Merge pull request #200724 from JonathanLorimer/allow-configuration-of-roles
services.postgresql: Allow configuration of user roles in ensureUser
2022-12-18 00:40:57 +01:00
happysalada
60797a3bfe surrealdb: add package option 2022-12-15 19:52:28 -05:00
happysalada
bdf8a69ecc surrealdb: module: add secret management 2022-12-10 10:57:13 -05:00
Naïm Favier
0ff3b35356 nixos/doc: fix some options 2022-12-08 17:52:52 +01:00
Robert Hensing
5775cfa4b8 nixos/cassandra: Prepare for cassandra 4
Its scripts disagree a bit with our flexible
logging approach and our default logging config.
Might want to revisit this at some point.

The `mkdir` failures in the log are harmless.
2022-12-06 14:09:38 +01:00
Robert Hensing
90b1c9fa10 nixos/cassandra: Refactor: extract version variables 2022-12-06 14:09:38 +01:00
Robert Hensing
7bfbf037d7 Merge remote-tracking branch 'upstream/master' into allow-configuration-of-roles 2022-12-02 18:12:14 +00:00
Daniel Nagy
dbe8182e74
treewide: switch to port type for nixos modules 2022-12-01 22:30:00 +01:00
figsoda
d65639ce40 nixos/redis: simplify 2022-11-30 17:38:52 -05:00
Jonathan Lorimer
4e502a1c4d
Update nixos/modules/services/databases/postgresql.nix
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-11-28 10:21:18 -05:00
Jonathan Lorimer
193aa6faf4
Add declarative role config to postgres.service
remove trailing whitespace

switch docs to markdown

use mdDoc

remove trailing whitespace

get rid of double space

add tests and update options to use submodule

remove whitespace

remove whitespace

use mdDoc

remove whitespace

make default a no-op

make ALTER ROLE a single sql statement

document null case
2022-11-28 09:44:46 -05:00
ajs124
195aa53509 nixos/redis: fix requirepass 2022-11-21 18:00:12 +01:00
happysalada
82ee824968 surrealdb: module init 2022-11-19 18:58:04 -05:00
figsoda
e920aed521
Merge pull request #200440 from nagy/treewide-modules
treewide: use `types.port` and `mkEnableOption` in nixos modules
2022-11-10 12:12:51 -05:00
Daniel Nagy
b4674b39c1
treewide: use mkEnableOption in nixos modules 2022-11-10 09:30:00 +01:00
Daniel Nagy
095269c862
treewide: use types.port in nixos modules 2022-11-10 09:30:00 +01:00
ajs124
bc4e9a890c nixos/redis: store config in state directory
this is needed because certain redis features, like sentinel, require
the config file to be persistent
2022-11-09 21:49:33 +01:00
ajs124
168ad716e0 nixos/redis: add extraParams 2022-11-09 16:43:04 +01:00
xeals
de4601c37e
nixos/influxdb2: set timezone data environment variable
Go reads the timezone database from ZONEINFO instead of TZDIR, which is otherwise
unset.
2022-11-06 11:12:42 +11:00
Jan Tojnar
04e85da1c0 doc/nixos/postgress: Mention extensions in upgrading
analyze_new_cluster script is not available in PostgreSQL 14+:

8f113698b6
2022-10-26 15:21:06 +02:00
Jan Tojnar
e598636243 doc/nixos/postgress: Mention extensions in upgrading
This is easy to miss and can lead to annoying failures.
2022-10-26 15:06:09 +02:00
Jan Tojnar
0de7128deb doc/nixos/postgress: Streamline upgrade script
We already need to set the package so no need to manually copy the schema version.
2022-10-26 15:05:13 +02:00
Christian Kögler
330bc02b01 nixos/influx: Fix cross compilation for configFile 2022-09-10 08:10:24 +02:00
pennae
f2ea09ecbe nixos/*: convert options with listings
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae
722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +02:00
pennae
9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
7d102d113a nixos/*: convert multiline inline code to listings
presumably it was not intended to have these blocks rendered inline, and
markdown conversion would be messy as well.
2022-08-31 16:27:25 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
b51f8036c2 nixos/*: use properly indented strings for option docs
using regular strings works well for docbook because docbook is not as
whitespace-sensitive as markdown. markdown would render all of these as
code blocks when given the chance.
2022-08-19 22:40:58 +02:00
pennae
f1d39b6d61 nixos/postgresql: replace <function> with <literal>
there's only this one use, we can live with the tiny rendering change.
2022-08-19 22:40:58 +02:00
ppom
26dbf446cf Change clickhouse's module conf directory to permit overrides
The module already creates the file `/etc/clickhouse-server/config.xml`.

If the service uses this file for config, it permits to override the conf like this:

```nix
environment.etc."clickhouse-server/config.d/logging.xml".text = ''
  <clickhouse>
    <logger>
      <level>notice</level>
    <logger>
  </clickhouse>
'';
```
2022-08-14 15:56:49 +02:00
gardspirito
aa6a8bd8dd nixos/neo4j: HTTP connector toggling 2022-08-12 15:45:48 -07:00
gardspirito
8d6f4552cd nixos/neo4j: fix typo 2022-08-12 15:45:48 -07:00
Kerstin Humm
a22112e88a neo4j: remove deprecated config 2022-08-12 15:45:48 -07:00
Kerstin Humm
9b60931986 neo4j: add erictapen as maintainer 2022-08-12 15:45:48 -07:00
Kerstin Humm
60b6ad6f37 nixos/neo4j: set some settings so warnings at startup disappear 2022-08-12 15:45:48 -07:00
Jonathan Ringer
0fbce25144 neo4j: 3.5.14 -> 4.1.1 2022-08-12 15:45:48 -07:00
pennae
50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
illustris
dffa97f03c nixos/hbase-standalone: add mkRenamedOptionModule and rename file 2022-08-07 21:21:45 +02:00
illustris
ac403b83fb nixos/hadoop: add HBase submodule 2022-08-07 21:21:45 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +02:00
pennae
16102dce2f nixos/*: replace <code> in option docs with <literal>
markdown can't represent the difference without another extension and
both the html manual and the manpage render them the same, so keeping the
distinction is not very useful on its own. with the distinction removed
we can automatically convert many options that use <code> tags to markdown.

the manpage remains unchanged, html manual does not render
differently (but class names on code tags do change from "code" to "literal").
2022-08-03 21:03:23 +02:00
pennae
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
Sergei Trofimovich
1e8102cd58 nixos/openldap: fix option description markdown
Otherwise manual build fails as:

    $ nix build -f nixos/release.nix manual.x86_64-linux
    ...
     > NotImplementedError: ('md node not supported yet', 'services.openldap.declarativeContents', 'inline_html', ('<code>',))
     For full logs, run 'nix log /nix/store/pfa7bg3pflp0c31ma0rc2ahwqabs88dd-base-json-md-converted.drv'.
2022-08-02 23:11:24 +01:00
github-actions[bot]
0f0010fda3
Merge master into staging-next 2022-08-02 06:02:34 +00:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
github-actions[bot]
b4832bac52
Merge staging-next into staging 2022-07-22 15:34:59 +00:00
Jörg Thalheim
8807057296 nixos/openldap: drop myself as maintainer 2022-07-22 16:54:13 +02:00
Martin Weinelt
457d109dcd
Merge pull request #179597 from Mic92/openldap-path
[staging] openldap: remove deprecated options, improve encapsulation
2022-07-22 00:26:32 +02:00
Kevin Cox
568d2e77f4
nixos.redis: Fix disabling of RDB persistence.
I was under the impression that setting `services.redis.servers.<name>.save = []` would disable RDB persistence as no schedule would mean no persistence. However since the code did not handle this case specially it actually results in no `save` setting being written and the internal Redis default is used.

This patch handles the empty case to disable RDB persistence.

Disabling RDB persistence is useful in a number of scenarios:

1. Using Redis in a pure-cache mode where persistence is not desired.
2. When using the (generally superior) AOF persistence mode this file is never read so there is little point to writing it.
3. When saving is handled manually

For more information see https://redis.io/docs/manual/persistence/

This is a breaking change as the user may have been relying on `[]` using Redis defaults. However I believe that updating the behaviour for the next release is beneficial as IMHO it is less surprising and does what the user would expect. I have added release notes to warn about this change.
2022-07-05 07:37:38 -04:00
Kai Wohlfahrt
60d1c1d9ad openldap: change runtime directory
Use `openldap` for consistency between `/var/lib` and `/run`.
2022-06-29 19:59:29 +02:00
Kai Wohlfahrt
334d622ec7 openldap: test starting with empty DB
This addresses the original concern behind #92544
2022-06-29 19:59:29 +02:00
Kai Wohlfahrt
8a7193fc0a openldap: test and fix mutable config 2022-06-29 19:59:29 +02:00
Kai Wohlfahrt
fd7d901133 openldap: run under systemd-defined user/group
This improves security, by starting the service as an unprivileged user,
rather than starting as root and relying on the service to drop
privileges. This requires a significant cleanup of pre-init scripts, to
make use of StateDirectory and RuntimeDirectory for permissions.
2022-06-29 19:59:29 +02:00
Kai Wohlfahrt
38ead944ce openldap: run in foreground
Now that we use notify daemon type, this works safely and simplifies
configuration.
2022-06-29 19:59:29 +02:00
Kai Wohlfahrt
d72f89a8fc openldap: Allow notify outside of main thread
This fixes a bug I observed in deployment on a RPi, but not able to
reproduce in tests.
2022-06-29 19:59:28 +02:00
Kai Wohlfahrt
6e6f33ad83 openldap: remove deprecated options 2022-06-29 19:59:06 +02:00
happysalada
b90fa9940b dgraph: add module 2022-06-28 02:34:54 -04:00
Thomas Depierre
fc658c86f7 riak, nixos/riak: remove
Riak have been updated a lot since the version 2.2 (now 3.0.10) but
has seen no updated to the package. This is at this point
a problem forcing us to maintain old versions of erlang.

We would be happy to re accept a newer version of Riak if someone want
to spend the time to set it up.
2022-06-25 15:51:18 -04:00
Robert Hensing
fe11145ec9 nixos/cassandra: Convert option docs to markdown 2022-06-21 13:20:13 +02:00