diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-02-24 22:27:39 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-02-24 22:27:39 +0100 |
commit | b1f65920c357b5cdde7123fabdc7a2af4d07f93e (patch) | |
tree | 1befc76484c8f4118660eec30f6f1b16fae2cb6f /nixos | |
parent | f7011c70f30acf0fe5a229b77e4ad22041b8872e (diff) | |
download | nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar.gz nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar.bz2 nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar.lz nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar.xz nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.tar.zst nixpkgs-b1f65920c357b5cdde7123fabdc7a2af4d07f93e.zip |
nixos/nextcloud: add `defaultPhoneRegion` option for v21
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 413db757357..5090d424c08 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -280,6 +280,24 @@ in { may be served via HTTPS. ''; }; + + defaultPhoneRegion = mkOption { + default = null; + type = types.nullOr types.str; + example = "DE"; + description = '' + <warning> + <para>This option exists since Nextcloud 21! If older versions are used, + this will throw an eval-error!</para> + </warning> + + <link xlink:href="https://www.iso.org/iso-3166-country-codes.html">ISO 3611-1</link> + country codes for automatic phone-number detection without a country code. + + With e.g. <literal>DE</literal> set, the <literal>+49</literal> can be omitted for + phone-numbers. + ''; + }; }; caching = { @@ -345,6 +363,9 @@ in { && !(acfg.adminpass != null && acfg.adminpassFile != null)); message = "Please specify exactly one of adminpass or adminpassFile"; } + { assertion = versionOlder cfg.package.version "21" -> cfg.config.defaultPhoneRegion == null; + message = "The `defaultPhoneRegion'-setting is only supported for Nextcloud >=21!"; + } ]; warnings = let @@ -442,6 +463,7 @@ in { 'dbtype' => '${c.dbtype}', 'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)}, 'trusted_proxies' => ${writePhpArrary (c.trustedProxies)}, + ${optionalString (c.defaultPhoneRegion != null) "'default_phone_region' => '${c.defaultPhoneRegion}',"} ]; ''; occInstallCmd = let |