fix some deprecated options
This commit is contained in:
parent
94943c1c0c
commit
7d0276e9f2
2 changed files with 14 additions and 5 deletions
|
@ -103,6 +103,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultPhoneRegion = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = ''
|
||||||
|
Two letters region defining default region.
|
||||||
|
'';
|
||||||
|
example = "US";
|
||||||
|
};
|
||||||
|
|
||||||
postgresSettings = lib.mkOption {
|
postgresSettings = lib.mkOption {
|
||||||
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
|
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -478,9 +486,6 @@ in
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
adminuser = cfg.adminUser;
|
adminuser = cfg.adminUser;
|
||||||
adminpassFile = toString cfg.adminPassFile;
|
adminpassFile = toString cfg.adminPassFile;
|
||||||
# Not using dbpassFile as we're using socket authentication.
|
|
||||||
defaultPhoneRegion = "US";
|
|
||||||
trustedProxies = [ "127.0.0.1" ];
|
|
||||||
};
|
};
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
|
|
||||||
|
@ -500,14 +505,17 @@ in
|
||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
appstoreEnable = true;
|
appstoreEnable = true;
|
||||||
|
|
||||||
extraOptions = let
|
settings = let
|
||||||
protocol = if !(isNull cfg.ssl) then "https" else "http";
|
protocol = if !(isNull cfg.ssl) then "https" else "http";
|
||||||
in {
|
in {
|
||||||
|
"default_phone_region" = cfg.defaultPhoneRegion;
|
||||||
|
|
||||||
"overwrite.cli.url" = "${protocol}://${fqdn}";
|
"overwrite.cli.url" = "${protocol}://${fqdn}";
|
||||||
"overwritehost" = fqdnWithPort;
|
"overwritehost" = fqdnWithPort;
|
||||||
# '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
|
# '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
|
||||||
# TODO: could instead set extraTrustedDomains
|
# TODO: could instead set extraTrustedDomains
|
||||||
"trusted_domains" = [ fqdn ];
|
"trusted_domains" = [ fqdn ];
|
||||||
|
"trusted_proxies" = [ "127.0.0.1" ];
|
||||||
# TODO: could instead set overwriteProtocol
|
# TODO: could instead set overwriteProtocol
|
||||||
"overwriteprotocol" = protocol; # Needed if behind a reverse_proxy
|
"overwriteprotocol" = protocol; # Needed if behind a reverse_proxy
|
||||||
"overwritecondaddr" = ""; # We need to set it to empty otherwise overwriteprotocol does not work.
|
"overwritecondaddr" = ""; # We need to set it to empty otherwise overwriteprotocol does not work.
|
||||||
|
@ -765,7 +773,7 @@ in
|
||||||
secretFile = "${cfg.dataDir}/config/secretFile";
|
secretFile = "${cfg.dataDir}/config/secretFile";
|
||||||
|
|
||||||
# See all options at https://github.com/pulsejet/nextcloud-oidc-login
|
# See all options at https://github.com/pulsejet/nextcloud-oidc-login
|
||||||
extraOptions = {
|
settings = {
|
||||||
allow_user_to_change_display_name = false;
|
allow_user_to_change_display_name = false;
|
||||||
lost_password_link = "disabled";
|
lost_password_link = "disabled";
|
||||||
oidc_login_provider_url = ssoFqdnWithPort;
|
oidc_login_provider_url = ssoFqdnWithPort;
|
||||||
|
|
|
@ -30,6 +30,7 @@ in
|
||||||
subdomain = "n";
|
subdomain = "n";
|
||||||
dataDir = "/var/lib/nextcloud";
|
dataDir = "/var/lib/nextcloud";
|
||||||
tracing = null;
|
tracing = null;
|
||||||
|
defaultPhoneRegion = "US";
|
||||||
|
|
||||||
# This option is only needed because we do not access Nextcloud at the default port in the VM.
|
# This option is only needed because we do not access Nextcloud at the default port in the VM.
|
||||||
externalFqdn = "n.example.com:8080";
|
externalFqdn = "n.example.com:8080";
|
||||||
|
|
Loading…
Reference in a new issue