Commit graph

818 commits

Author SHA1 Message Date
Marie Ramlow 050858f84c nixos/victorialogs: use pkgs.victorialogs by default
(cherry picked from commit b9a699fe22)
2025-10-11 23:24:10 +02:00
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00
Wolfgang Walther 6c1e6f90d3
treewide: remove unused rec
Auto-fix by nixf-diagnose.

(cherry picked from commit 90e7159c55)
2025-10-05 12:38:23 +02:00
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Wolfgang Walther a46262ae77
treewide: run treefmt with mdcr/nixfmt 2025-07-24 14:58:15 +02:00
Wolfgang Walther ad1379b5e0
treewide: fix syntax errors in nix code blocks
Fixes all code blocks with "nix" language in markdown files for syntax
errors to be able to run nixfmt in the next step.

(cherry picked from commit 6c47e7d5da)
2025-07-24 14:46:05 +02:00
Maximilian Bosch fda50d6f3a nixos/postgresql: add section about pg_config
See https://discourse.nixos.org/t/i-cannot-for-the-life-of-me-find-the-package-that-has-pg-config/66244/4

I decided against doing this in its own nixpkgs manual: the line
to draw is quite blurry already (e.g. we have documented our package
removal policy in here as well) and having to check two manuals for a
single subsystem feels pretty annoying to me.

The relevant part - where to find pg_config - is written at the top. I
decided to give a bit more context about the way our packaging works
since I realized a few times now that I don't remember all the details
about the problems we had in the past and having to look up individual
commit messages for that isn't very productive.

(cherry picked from commit e031c5ff6b)
2025-07-03 17:44:10 +00:00
ActuallyRuben d643bc40c3 nixos/mongodb: fix initialScript when no initialRootPasswordFile is set
(cherry picked from commit 3400dbdfcd)
2025-06-20 12:09:24 +00:00
Maximilian Bosch 7af24ae020 nixos/postgresql: doc review
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
(cherry picked from commit 2a6405fb15)
2025-06-17 10:30:31 +00:00
Maximilian Bosch e3fabc9360 nixos/postgresql: fix docs on default package
Closes #416595

(cherry picked from commit e6cc23ba3f)
2025-06-17 10:30:31 +00:00
Marc Fontaine 7c65985b2c nixos/postgrest: fix typo in name of configuration options (#411197)
The config-file key is 'server-unix-socket-mode', not 'service-unix-socket-mode'.

(cherry picked from commit b134f3148f)
2025-05-28 14:43:13 +00:00
Wolfgang Walther 3d29b7d3a2
nixos/postgresql: improve local peer authentication with default map
This allows to easily map allowed database roles to system users.
2025-05-11 10:24:21 +02:00
Wolfgang Walther 7d0363742c
nixos/postgresql: remove recoveryConfig option
Since v12, PostgreSQL doesn't support recovery.conf anymore and fails to
start up when this option is set:

  FATAL:  using recovery command file "recovery.conf" is not supported

This is documented at:

https://www.postgresql.org/docs/current/recovery-config.html
2025-05-08 12:16:25 +02:00
Wolfgang Walther 0f9a499fbc
nixos/postgrest: make unix-socket accessible for other services 2025-05-06 11:14:59 +02:00
Thomas Gerbet ae11d4be17 cassandra_3_0, cassandra_3_11: remove due to EOL
Cassandra 3.0 and 3.11 are End of Life.
https://cassandra.apache.org/_/blog/Apache-Cassandra-3.0.x-and-3.11.x-End-of-Life-Announcement.html
2025-04-22 10:19:56 +02:00
nixpkgs-ci[bot] 5858ce00b1
Merge master into staging-next 2025-04-11 09:43:11 +00:00
Wolfgang Walther d62c14f5d1
nixos/postgres-websockets: init 2025-04-10 10:12:27 +02:00
K900 0842b11f2b Merge remote-tracking branch 'origin/master' into staging-next 2025-04-08 09:29:48 +03:00
6543 2ab1f218fb nixos/services.mysql: fix galeraCluster.clusterAddress is evaluated before assertions are checked 2025-04-07 21:04:44 +02:00
K900 05bc93a58a Merge remote-tracking branch 'origin/master' into staging-next 2025-04-06 11:20:16 +03:00
6543 cac3bdab21
nixos/services.mysql: add galera cluster options (#388978)
And add release notes for new option.

Co-authored-by: Arne Keller <arne.keller@posteo.de>
2025-04-06 00:26:06 +02:00
Silvan Mosberger e52d633a63 Merge remote-tracking branch 'upstream/staging-next' into staging 2025-04-02 18:30:54 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
nixpkgs-ci[bot] 86e22e1e80
Merge staging-next into staging 2025-03-31 12:06:34 +00:00
Wolfgang Walther 064432a519
nixos/postgrest: init module 2025-03-30 14:24:16 +02:00
nixpkgs-ci[bot] d9eb3e5d48
Merge staging-next into staging 2025-03-28 12:06:30 +00:00
Maximilian Bosch 360cd99eed
Merge: nixos/doc: include extensions in postgresql upgrade script (#392831) 2025-03-28 10:33:00 +01:00
K900 aca918e668 Merge remote-tracking branch 'origin/staging-next' into staging 2025-03-25 21:06:52 +03:00
Wolfgang Walther 7277ebc2f9
Reapply "nixos/postgresql: add docs about procedural languages"
This reverts commit a4006e4970.
2025-03-25 15:00:50 +01:00
Wolfgang Walther a4006e4970
Revert "nixos/postgresql: add docs about procedural languages"
This reverts commit 0bc099abd6.
2025-03-25 14:58:02 +01:00
Kai 4867d68ec9
nixos/doc: include extensions in postgresql upgrade script 2025-03-25 07:59:01 +01:00
Wolfgang Walther 0bc099abd6
nixos/postgresql: add docs about procedural languages 2025-03-23 15:07:43 +01:00
Wolfgang Walther 24775f6543
nixos/postgresql: fix reference to LLVM closure size
In fact, the current difference is:
- 157M for postgresql to
- 756M for postgresql_jit

That's a difference of 589M.
2025-03-23 15:07:39 +01:00
Wolfgang Walther 89b30e5b15
nixos/postgresql: fix spelling and grammar in docs 2025-03-23 15:07:36 +01:00
jopejoe1 dca7e827b3
nixos: Replace custom cfg format handling with pkgs.formats (#314933) 2025-03-14 21:08:14 +01:00
Maximilian Bosch 25310642c6
Merge: nixos/postgresql: allow customisations of SystemCallFilter (#386345) 2025-03-11 17:11:28 +01:00
Sandro bcfa2a020c
nixos/postgresql: fix merging of shared_preload_libraries option (#388754) 2025-03-10 19:32:38 +01:00
Maximilian Bosch 8bf1e138bc
nixos/postgresql: fix merging of shared_preload_libraries option
Closes #386804

The issue with coercing to `types.str` is that it's not mergeable, so
any declarations will result in an eval error like this:

    error: The option `interactive.nodes.tmp.services.postgresql.settings.shared_preload_libraries' has conflicting definition values:
    - In `/home/ma27/Projects/nixpkgs-hack/tmp.nix@node-tmp': "foo"
    - In `/home/ma27/Projects/nixpkgs-hack/tmp.nix@node-tmp': "bar2"
    Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.

Using a mergeable type (`types.comma`, i.e. a string, where all declarations
get joined with a comma as delimiter) fixes the problem.
2025-03-10 18:07:44 +01:00
6543 e00090dddf services.mysql: make sql statements consistent uppercase 2025-03-06 07:03:49 +01:00
6543 534f90a262 services.mysql: on create initial databases add savety statement 'IF NOT EXISTS' for edgecases 2025-03-06 07:03:49 +01:00
6543 41ec4243d1 services.mysql: wait for galera cluster sync to be done 2025-03-06 07:03:49 +01:00
Maximilian Bosch 6e87867ee3
nixos/postgresql: allow customisations of SystemCallFilter
Closes #385603

The problem described is that `wal-g` requires syscalls from `@resources`.
However, we don't have support for it in the module now and I don't
think it's reasonable to only support hardening adjustments for things
support by this module. Also, list is a bad datatype here since it
doesn't allow the level of customizations we need.

This is only for the syscall filterset since it's the option that's hard
to customize otherwise. For downstream configs, it's recommended to
adjust the hardening as needed in other cases.

Hence I decided to implement `services.postgresql.systemCallFilter` with
the following semantics:

* `systemCallFilter."~@resources" = true` adds `~@resources` to the
  filterset.

* Setting this to `false` (e.g. in a downstream configuration using
  `wal-g`) removes the entry `~@resources` from the filterset. In this
  case it's sufficient since `@system-service` implies `@resources` and
  the `~@resources` declaration after that discards that.

  I decided to not implement logic about negations in here, but to keep
  it rather simple by only allowing to set/unset entries.

As described in `systemd.exec(5)`, the ordering matters: e.g.
`@system-service` implies `@resources`, but `~@resources` _after_ that
reverts that. By default, the ordering of the keys is as follows:

* syscall groups (starting with `@`) come at first.
* negations of syscall groups (starting with `~@`) come after that.
* anything else at the end.

If further ordering is needed, it can be done like this:

```
{
  services.postgresql.systemCallFilter."~@resources" = {
    enable = true; # whether or not it's part of the final SystemCallFilter
    priority = 23; # ordering priority in the filterset.
  };
}
```

The lower the priority, the higher up the entry will be in the final
filterset.
2025-03-02 11:20:18 +01:00
Peder Bergebakken Sundt d525eb5838 treewide: fix typos
done with `fd \\\.md$ . --type f -x typos --write-changes`
2025-02-22 02:02:07 +01:00
Ivan Trubach d8657587c0
nixos/victorialogs: init module (#376834) 2025-02-20 14:57:55 +03:00
Sam Willcocks a3827a595e nixos/victorialogs: init module 2025-02-17 11:23:20 +00:00
nixpkgs-ci[bot] 43a5de6cbb
Merge master into staging-next 2025-02-14 12:05:56 +00:00
6543 6449da32b2 nixos/services.mysql: add myselfe as maintainer 2025-02-14 01:06:52 +01:00
6543 0256f1180c nixos/services.mysql: format with nixfmt-rfc-style 2025-02-14 01:06:22 +01:00
Julien Langlois 37372eb227
nixos/postgresql/citus: fix syscall filter and add test 2025-02-09 18:07:27 -05:00
Arne Keller cf577e4308
foundationdb: pin Boost 1.86 and fix Makefile (#376230) 2025-01-26 14:18:54 +01:00