nixpkgs/nixos/modules
Maximilian Bosch bae5e65162
nixos/nextcloud: fix nginx routing to store and nix apps
Closes #277206

The bug mentioned above was a symptom of the issue fixed here: when
opening the `forms` app which is installed via `extraApps` (or the
app store) the site wouldn't work because `.mjs` files had the wrong
Content-Type.

The actual problem got fixed already[1], however this config was not
used for stuff from `/nix-apps` & `/store-apps` which had their own
location section with only a `root ;` statement.

In fact, this setup isn't strictly supported by Nextcloud upstream[2],
so to fix this for good, I decided to follow the upstream suggestion for
app directories outside the server root, i.e. linking them back into the
store path.

This means that the module generates a new derivation now with

* `services.nextcloud.package` linked into it via `lndir`.
* under `nix-apps` is a symlink to the link farm containing all apps
  from `services.nextcloud.extraApps`.
* under `store-apps` is a symlink to `/var/lib/nextcloud/store-apps`.
  Since this is only used in the NixOS module that also configures this
  location for imperatively installed apps, this seems an OK thing to
  do.

Successfully tested the change on a productive Nextcloud 28.0.1 with
several apps installed via `extraApps` (`forms`, `cospend`, `maps`,
`user_saml` and a few more).

[1] 292c74c7a9
[2] https://docs.nextcloud.com/server/28/admin_manual/apps_management.html#using-custom-app-directories
2023-12-29 18:59:18 +01:00
..
config Merge pull request #271326 from philiptaron/shutdown.target 2023-12-27 08:33:26 +01:00
hardware nixos/firmware: Omit removed rtl8723-bs package 2023-12-18 10:49:40 -08:00
i18n/input-method treewide: /lib/libexec -> /libexec 2023-11-26 10:55:37 +03:00
image image/repart: build image with buildPackages 2023-12-21 15:11:13 -08:00
installer nixos/system.disableInstallerTools: Do define options without effect 2023-11-19 21:21:16 +01:00
misc nixos/mandoc: don't create leading double slashes in MANPATH 2023-12-24 18:44:36 +01:00
profiles Merge pull request #273308 from Stunkymonkey/install-device-fix-mdadm 2023-12-25 23:41:10 +01:00
programs Merge pull request #276377 from mkg20001/cinnamon-fix-gpaste 2023-12-25 16:55:54 +01:00
security Merge pull request #271326 from philiptaron/shutdown.target 2023-12-27 08:33:26 +01:00
services nixos/nextcloud: fix nginx routing to store and nix apps 2023-12-29 18:59:18 +01:00
system Merge pull request #271326 from philiptaron/shutdown.target 2023-12-27 08:33:26 +01:00
tasks Merge pull request #271326 from philiptaron/shutdown.target 2023-12-27 08:33:26 +01:00
testing nixos/test-instrumentation: Fix backdoor ordering 2023-11-12 15:04:38 -05:00
virtualisation Merge pull request #271326 from philiptaron/shutdown.target 2023-12-27 08:33:26 +01:00
module-list.nix nixos/rspamd-trainer: init; rspamd-trainer: init at unstable-2023-11-27 2023-12-27 10:35:53 +01:00
rename.nix prayer: remove 2023-11-10 20:44:28 -03:00