Merge pull request #56489 from Ma27/add-nextcloud-overwriteprotocol-option

nixos/nextcloud: add overwriteProtocol option
This commit is contained in:
Franz Pletz 2019-03-02 00:21:26 +00:00 committed by GitHub
commit e4808a6587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,6 +223,19 @@ in {
<literal>services.nextcloud.hostname</literal> here.
'';
};
overwriteProtocol = mkOption {
type = types.nullOr (types.enum [ "http" "https" ]);
default = null;
example = "https";
description = ''
Force Nextcloud to always use HTTPS i.e. for link generation. Nextcloud
uses the currently used protocol by default, but when behind a reverse-proxy,
it may use <literal>http</literal> for everything although Nextcloud
may be served via HTTPS.
'';
};
};
caching = {
@ -287,6 +300,7 @@ in {
${optionalString cfg.caching.apcu "'memcache.local' => '\\OC\\Memcache\\APCu',"}
'log_type' => 'syslog',
'log_level' => '${builtins.toString cfg.logLevel}',
${optionalString (cfg.config.overwriteProtocol != null) "'overwriteprotocol' => '${cfg.config.overwriteProtocol}',"}
];
'';
occInstallCmd = let