Skip to content

Commit 7d0276e

Browse files
ibizamanibizaman
ibizaman
authored andcommitted
fix some deprecated options
1 parent 94943c1 commit 7d0276e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

modules/services/nextcloud-server.nix

+13-5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ in
103103
'';
104104
};
105105

106+
defaultPhoneRegion = lib.mkOption {
107+
type = lib.types.str;
108+
description = ''
109+
Two letters region defining default region.
110+
'';
111+
example = "US";
112+
};
113+
106114
postgresSettings = lib.mkOption {
107115
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
108116
default = null;
@@ -478,9 +486,6 @@ in
478486
dbtype = "pgsql";
479487
adminuser = cfg.adminUser;
480488
adminpassFile = toString cfg.adminPassFile;
481-
# Not using dbpassFile as we're using socket authentication.
482-
defaultPhoneRegion = "US";
483-
trustedProxies = [ "127.0.0.1" ];
484489
};
485490
database.createLocally = true;
486491

@@ -500,14 +505,17 @@ in
500505
extraAppsEnable = true;
501506
appstoreEnable = true;
502507

503-
extraOptions = let
508+
settings = let
504509
protocol = if !(isNull cfg.ssl) then "https" else "http";
505510
in {
511+
"default_phone_region" = cfg.defaultPhoneRegion;
512+
506513
"overwrite.cli.url" = "${protocol}://${fqdn}";
507514
"overwritehost" = fqdnWithPort;
508515
# '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
509516
# TODO: could instead set extraTrustedDomains
510517
"trusted_domains" = [ fqdn ];
518+
"trusted_proxies" = [ "127.0.0.1" ];
511519
# TODO: could instead set overwriteProtocol
512520
"overwriteprotocol" = protocol; # Needed if behind a reverse_proxy
513521
"overwritecondaddr" = ""; # We need to set it to empty otherwise overwriteprotocol does not work.
@@ -765,7 +773,7 @@ in
765773
secretFile = "${cfg.dataDir}/config/secretFile";
766774

767775
# See all options at https://github.com/pulsejet/nextcloud-oidc-login
768-
extraOptions = {
776+
settings = {
769777
allow_user_to_change_display_name = false;
770778
lost_password_link = "disabled";
771779
oidc_login_provider_url = ssoFqdnWithPort;

test/vm/nextcloud.nix

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ in
3030
subdomain = "n";
3131
dataDir = "/var/lib/nextcloud";
3232
tracing = null;
33+
defaultPhoneRegion = "US";
3334

3435
# This option is only needed because we do not access Nextcloud at the default port in the VM.
3536
externalFqdn = "n.example.com:8080";

0 commit comments

Comments
 (0)