|
103 | 103 | '';
|
104 | 104 | };
|
105 | 105 |
|
| 106 | + defaultPhoneRegion = lib.mkOption { |
| 107 | + type = lib.types.str; |
| 108 | + description = '' |
| 109 | + Two letters region defining default region. |
| 110 | + ''; |
| 111 | + example = "US"; |
| 112 | + }; |
| 113 | + |
106 | 114 | postgresSettings = lib.mkOption {
|
107 | 115 | type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
|
108 | 116 | default = null;
|
|
478 | 486 | dbtype = "pgsql";
|
479 | 487 | adminuser = cfg.adminUser;
|
480 | 488 | adminpassFile = toString cfg.adminPassFile;
|
481 |
| - # Not using dbpassFile as we're using socket authentication. |
482 |
| - defaultPhoneRegion = "US"; |
483 |
| - trustedProxies = [ "127.0.0.1" ]; |
484 | 489 | };
|
485 | 490 | database.createLocally = true;
|
486 | 491 |
|
|
500 | 505 | extraAppsEnable = true;
|
501 | 506 | appstoreEnable = true;
|
502 | 507 |
|
503 |
| - extraOptions = let |
| 508 | + settings = let |
504 | 509 | protocol = if !(isNull cfg.ssl) then "https" else "http";
|
505 | 510 | in {
|
| 511 | + "default_phone_region" = cfg.defaultPhoneRegion; |
| 512 | + |
506 | 513 | "overwrite.cli.url" = "${protocol}://${fqdn}";
|
507 | 514 | "overwritehost" = fqdnWithPort;
|
508 | 515 | # 'trusted_domains' needed otherwise we get this issue https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/2
|
509 | 516 | # TODO: could instead set extraTrustedDomains
|
510 | 517 | "trusted_domains" = [ fqdn ];
|
| 518 | + "trusted_proxies" = [ "127.0.0.1" ]; |
511 | 519 | # TODO: could instead set overwriteProtocol
|
512 | 520 | "overwriteprotocol" = protocol; # Needed if behind a reverse_proxy
|
513 | 521 | "overwritecondaddr" = ""; # We need to set it to empty otherwise overwriteprotocol does not work.
|
|
765 | 773 | secretFile = "${cfg.dataDir}/config/secretFile";
|
766 | 774 |
|
767 | 775 | # See all options at https://github.com/pulsejet/nextcloud-oidc-login
|
768 |
| - extraOptions = { |
| 776 | + settings = { |
769 | 777 | allow_user_to_change_display_name = false;
|
770 | 778 | lost_password_link = "disabled";
|
771 | 779 | oidc_login_provider_url = ssoFqdnWithPort;
|
|
0 commit comments