nixpkgs/nixos/doc/manual/release-notes
Maximilian Bosch 90787dbe89
nixos/nextcloud: set up base directories & override.config.php with tmpfiles
Closes #169733

The issue is that Nextcloud fails to start up after a GC because the
symlink from `override.config.php` is stale.

I'm relatively certain that this is not a bug in the Nix GC - that
would've popped up somewhere else already in the past years - and one of
the reporters seems to confirm that: when they restarted
`nextcloud-setup.service` after the issue appeared, an
`override.config.php` pointing to a different hash was there.

This hints that on a deploy `nextcloud-setup` wasn't restarted properly
and thus replacing the symlink update was missed. This is relatively
hard to trigger due to the nature of the bug unfortunately (you usually
keep system generations for a few weeks and you'll need to change the
configuration - or stdenv - to get a different `override.config.php`),
so getting pointers from folks who are affected is rather complicated.

So I decided to work around this by using systemd-tmpfiles which a lot
of other modules already utilize for this use-case. Now,
`override.config.php` and the directory structure aren't created by
`nextcloud-setup`, but by `systemd-tmpfiles`.

With that, the structure is guaranteed to exist

* on boot, since tmpfiles are always created/applied then
* on config activation, since this is done before services are
  (re)started which covers the case for new installations and existing
  ones.

Also, the recursive `chgrp` was used as transition tool when we switched
from `nginx` as owning group to a dedicated `nextcloud` group[1][2], but
this was several releases ago, so I don't consider this relevant
anymore.

[1] fd9eb16b24
[2] ca916e8cb3
2024-01-12 22:11:36 +01:00
..
release-notes.md nixos/doc: include section for 24.05 2023-12-14 19:20:33 +01:00
rl-1310.section.md
rl-1404.section.md
rl-1412.section.md
rl-1509.section.md manual: fix parsing differences for markdown-it-py 3 2023-09-27 15:35:23 +02:00
rl-1603.section.md
rl-1609.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
rl-1703.section.md
rl-1709.section.md nixos: fix typos 2023-05-19 22:31:04 -04:00
rl-1803.section.md nixos: fix typos 2023-05-19 22:31:04 -04:00
rl-1809.section.md
rl-1903.section.md nixos: fix typos 2023-05-19 22:31:04 -04:00
rl-1909.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
rl-2003.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
rl-2009.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
rl-2105.section.md treewide: Fix typos 2023-09-28 19:06:13 +02:00
rl-2111.section.md nixos/snapraid: remove from top-level 2023-12-06 19:02:38 +01:00
rl-2205.section.md nixos/modemmanager: enableFccUnlock -> enableBundledFccUnlockScripts 2023-09-12 16:55:15 +02:00
rl-2211.section.md doc: avoid 'simply' (#266434) 2023-11-09 21:48:05 +01:00
rl-2305.section.md alsa-utils: fix eval 2023-11-17 00:46:24 +01:00
rl-2311.section.md nixos/wpa_supplicant: Ensure the generated config isn't world-readable 2023-12-09 21:33:55 +00:00
rl-2405.section.md nixos/nextcloud: set up base directories & override.config.php with tmpfiles 2024-01-12 22:11:36 +01:00