nixpkgs/nixos/modules/services/web-apps
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
..
atlassian treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
icingaweb2
kasmweb
akkoma.md
akkoma.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
alps.nix
anuko-time-tracker.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
audiobookshelf.nix
bookstack.nix
c2fmzq-server.md nixos/c2fmzq-server: init module 2023-10-26 17:27:51 +02:00
c2fmzq-server.nix nixos/c2fmzq-server: init module 2023-10-26 17:27:51 +02:00
calibre-web.nix
changedetection-io.nix
chatgpt-retrieval-plugin.nix
cloudlog.nix nixos: fix bad mkEnableOption descriptions 2023-10-20 16:22:40 +01:00
code-server.nix Revert "code-server: drop" 2023-12-19 15:40:57 +01:00
coder.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
convos.nix
dex.nix
discourse.md
discourse.nix treewide: fix redirected and broken URLs 2023-11-11 10:49:01 +01:00
documize.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
dokuwiki.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
dolibarr.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
engelsystem.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
ethercalc.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
fluidd.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
freshrss.nix nixos/freshrss: Stop running the updater service on system activation 2023-12-25 09:57:47 +01:00
galene.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
gerrit.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
gotify-server.nix
gotosocial.md
gotosocial.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
grocy.md
grocy.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
guacamole-client.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
guacamole-server.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
healthchecks.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
hedgedoc.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
hledger-web.nix nixos: fix bad mkEnableOption descriptions 2023-10-20 16:22:40 +01:00
honk.md
honk.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
invidious.nix nixos/invidious: Fix user message on 24.05 changes 2023-12-26 20:44:04 -05:00
invoiceplane.nix nixos/invoiceplane: Add settings option 2023-11-24 10:25:46 +00:00
isso.nix nixos: fix bad mkEnableOption descriptions 2023-10-20 16:22:40 +01:00
jirafeau.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
jitsi-meet.md
jitsi-meet.nix nixos/jitsi-meet: Integrate jigasi 2023-12-07 13:36:53 +00:00
kavita.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
keycloak.md
keycloak.nix Merge pull request #267906 from talyz/keycloak-hostname-url 2023-12-07 12:07:49 +01:00
komga.nix
lanraragi.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
lemmy.md
lemmy.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
limesurvey.nix
mainsail.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
mastodon.nix nixos/mastodon: replace ffmpeg to ffmpeg-headless 2023-12-20 18:01:55 +03:00
matomo.md
matomo.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
mattermost.nix nixos/mattermost: fix mkPackageOption default name 2023-12-04 23:12:25 +01:00
mediawiki.nix Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption 2023-11-30 02:49:30 +01:00
meme-bingo-web.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
microbin.nix
miniflux.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
mobilizon.nix treewide: fix services.postgresql.extraPlugins usage 2023-12-08 14:58:18 +01:00
monica.nix
moodle.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
netbox.nix netbox: Inherit gunicorn from the package 2023-11-30 11:51:37 +01:00
nextcloud-notify_push.nix
nextcloud.md nixos/doc: mention nc28 2023-12-14 17:44:41 +01:00
nextcloud.nix nixos/nextcloud: fix nginx routing to store and nix apps 2023-12-29 18:59:18 +01:00
nexus.nix
nifi.nix
node-red.nix nixos/node-red: fix cfg.package default value documentation 2023-12-16 21:03:18 +01:00
onlyoffice.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
openvscode-server.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
openwebrx.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
outline.nix nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15 2023-11-13 17:16:25 +01:00
peering-manager.nix nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15 2023-11-13 17:16:25 +01:00
peertube.nix peertube: Clarify option descriptions of listenHttp, listenWeb, enableWebHttps 2023-11-22 21:15:36 +01:00
pgpkeyserver-lite.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
photoprism.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
phylactery.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
pict-rs.md
pict-rs.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
pixelfed.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
plantuml-server.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
plausible.md
plausible.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
powerdns-admin.nix
prosody-filer.nix
restya-board.nix
rimgo.nix
rss-bridge.nix
selfoss.nix
sftpgo.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
shiori.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
slskd.nix treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
snipe-it.nix snipe-it: Convert to php.buildComposerPackage 2023-10-26 18:51:05 +02:00
sogo.nix
trilium.nix
tt-rss.nix nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15 2023-11-13 17:16:25 +01:00
vikunja.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
whitebophir.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
wiki-js.nix
windmill.nix nixos/windmill: init module 2023-12-05 22:54:18 +00:00
wordpress.nix Revert "wordpress: fixed installing of languages" 2023-12-07 18:27:40 +01:00
writefreely.nix
youtrack.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
zabbix.nix treewide: use mkPackageOption 2023-11-27 01:28:36 +01:00
zitadel.nix nixos: fix bad mkEnableOption descriptions 2023-10-20 16:22:40 +01:00