mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Merge pull request #169932 from Ma27/nextcloud-profile-setting
nixos/nextcloud: make `profile.enabled` configurable
This commit is contained in:
commit
fc1248c589
1 changed files with 26 additions and 0 deletions
|
@ -522,6 +522,29 @@ in {
|
||||||
The nextcloud-occ program preconfigured to target this Nextcloud instance.
|
The nextcloud-occ program preconfigured to target this Nextcloud instance.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
globalProfiles = mkEnableOption "global profiles" // {
|
||||||
|
description = ''
|
||||||
|
Makes user-profiles globally available under <literal>nextcloud.tld/u/user.name</literal>.
|
||||||
|
Even though it's enabled by default in Nextcloud, it must be explicitly enabled
|
||||||
|
here because it has the side-effect that personal information is even accessible to
|
||||||
|
unauthenticated users by default.
|
||||||
|
|
||||||
|
By default, the following properties are set to <quote>Show to everyone</quote>
|
||||||
|
if this flag is enabled:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>About</para></listitem>
|
||||||
|
<listitem><para>Full name</para></listitem>
|
||||||
|
<listitem><para>Headline</para></listitem>
|
||||||
|
<listitem><para>Organisation</para></listitem>
|
||||||
|
<listitem><para>Profile picture</para></listitem>
|
||||||
|
<listitem><para>Role</para></listitem>
|
||||||
|
<listitem><para>Twitter</para></listitem>
|
||||||
|
<listitem><para>Website</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
Only has an effect in Nextcloud 23 and later.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
nginx.recommendedHttpHeaders = mkOption {
|
nginx.recommendedHttpHeaders = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -650,6 +673,8 @@ in {
|
||||||
if x == null then "false"
|
if x == null then "false"
|
||||||
else boolToString x;
|
else boolToString x;
|
||||||
|
|
||||||
|
nextcloudGreaterOrEqualThan = req: versionAtLeast cfg.package.version req;
|
||||||
|
|
||||||
overrideConfig = pkgs.writeText "nextcloud-config.php" ''
|
overrideConfig = pkgs.writeText "nextcloud-config.php" ''
|
||||||
<?php
|
<?php
|
||||||
${optionalString requiresReadSecretFunction ''
|
${optionalString requiresReadSecretFunction ''
|
||||||
|
@ -689,6 +714,7 @@ in {
|
||||||
'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)},
|
'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)},
|
||||||
'trusted_proxies' => ${writePhpArrary (c.trustedProxies)},
|
'trusted_proxies' => ${writePhpArrary (c.trustedProxies)},
|
||||||
${optionalString (c.defaultPhoneRegion != null) "'default_phone_region' => '${c.defaultPhoneRegion}',"}
|
${optionalString (c.defaultPhoneRegion != null) "'default_phone_region' => '${c.defaultPhoneRegion}',"}
|
||||||
|
${optionalString (nextcloudGreaterOrEqualThan "23") "'profile.enabled' => ${boolToString cfg.globalProfiles}"}
|
||||||
${objectstoreConfig}
|
${objectstoreConfig}
|
||||||
];
|
];
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue