Skip to content

Commit

Permalink
fix some deprecated options
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman committed Feb 7, 2024
1 parent 94943c1 commit 6c3c99d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions demo/nextcloud/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
subdomain = "n";
dataDir = "/var/lib/nextcloud";
tracing = null;
defaultPhoneRegion = "US";

# This option is only needed because we do not access Nextcloud at the default port in the VM.
port = 8080;
Expand Down
16 changes: 12 additions & 4 deletions modules/services/nextcloud-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ in
'';
};

defaultPhoneRegion = lib.mkOption {
type = lib.types.str;
description = ''
Two letters region defining default region.
'';
example = "US";
};

postgresSettings = lib.mkOption {
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
default = null;
Expand Down Expand Up @@ -479,8 +487,8 @@ in
adminuser = cfg.adminUser;
adminpassFile = toString cfg.adminPassFile;
# Not using dbpassFile as we're using socket authentication.
defaultPhoneRegion = "US";
trustedProxies = [ "127.0.0.1" ];
default_phone_region = cfg.defaultPhoneRegion;
trusted_proxies = [ "127.0.0.1" ];
};
database.createLocally = true;

Expand All @@ -500,7 +508,7 @@ in
extraAppsEnable = true;
appstoreEnable = true;

extraOptions = let
settings = let
protocol = if !(isNull cfg.ssl) then "https" else "http";
in {
"overwrite.cli.url" = "${protocol}://${fqdn}";
Expand Down Expand Up @@ -765,7 +773,7 @@ in
secretFile = "${cfg.dataDir}/config/secretFile";

# See all options at https://github.com/pulsejet/nextcloud-oidc-login
extraOptions = {
settings = {
allow_user_to_change_display_name = false;
lost_password_link = "disabled";
oidc_login_provider_url = ssoFqdnWithPort;
Expand Down

0 comments on commit 6c3c99d

Please sign in to comment.