Revert "nextcloud: use mkDefault for whole nginx config"
This breaks the Nextcloud vhost declaration when adding e.g. another
vhost as the `services.nginx.virtualHosts` option has `{ nextcloud =
...; }` as *default* value which will be replaced by another
`virtualHosts`-declaration with a higher (e.g. the default) priority.
The following cases are now supported & covered by the module:
* `nginx` is enabled with `nextcloud` enabled and other vhosts can be
added / other options can be declared without having to care
about the declaration's priority.
* Settings in the `nextcloud`-vhost in `nginx` have to be altered using
`mkForce` as this is the only way how we officially support `nginx`
for `nextcloud` and customizations have to be done explicitly using
`mkForce`.
* `nginx` will be completely omitted if a user enables nextcloud
and disables nginx using `services.nginx.enable = false;`. (because
nginx will be enabled by this module using `mkDefault`).
This reverts commit 128dbb31cc
.
Closes #95259
This commit is contained in:
parent
5880dc0d10
commit
fddeb7cb73
1 changed files with 87 additions and 89 deletions
|
@ -531,9 +531,8 @@ in {
|
|||
|
||||
environment.systemPackages = [ occ ];
|
||||
|
||||
services.nginx = mkDefault {
|
||||
enable = true;
|
||||
virtualHosts.${cfg.hostName} = {
|
||||
services.nginx.enable = mkDefault true;
|
||||
services.nginx.virtualHosts.${cfg.hostName} = {
|
||||
root = cfg.package;
|
||||
locations = {
|
||||
"= /robots.txt" = {
|
||||
|
@ -632,7 +631,6 @@ in {
|
|||
''}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue