nextcloud finally works with local api calls

This commit is contained in:
Danilo Reyes 2025-01-22 19:51:53 -06:00
parent cdd9dac355
commit a83fbf5e9a
2 changed files with 32 additions and 14 deletions

View File

@ -189,7 +189,7 @@
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
url = cfg.local;
url = "https://127.0.0.1";
type = cfg.name;
username = "{{HOMEPAGE_VAR_NEXTCLOUD_USERNAME}}";
password = "{{HOMEPAGE_VAR_NEXTCLOUD_PASSWORD}}";

View File

@ -83,8 +83,13 @@ in
configureRedis = true;
extraAppsEnable = true;
enableImagemagick = true;
maxUploadSize = "16G";
maxUploadSize = "8096M";
hostName = cfg.host;
caching = {
redis = true;
memcached = true;
apcu = true;
};
extraApps = {
inherit (config.services.nextcloud.package.packages.apps)
bookmarks
@ -110,7 +115,6 @@ in
hash = "sha256-FtYItN0Iy2QpSNf0GPs7fIPYgBdEuKHJGwZ7GQNySZE=";
license = "agpl3Only";
};
};
config = {
adminpassFile = config.sops.secrets.nextcloud-adminpass.path;
@ -142,27 +146,39 @@ in
};
settings = {
log_type = "file";
log_level = 2;
trusted_proxies = [ "192.168.1.100" ];
loglevel = 1;
trusted_domains = [
config.my.ips.miniserver
"localhost"
"cloud.rotehaare.art"
"danilo-reyes.com"
"cloud.servidos.lat"
];
overwriteprotocol = "https";
overwrite.cli.url = "${cfg.url}";
forwarded_for_headers = [ "HTTP_X_FORWARDED_FOR" ];
overwrite_protocol = "https";
default_phone_region = "MX";
allow_local_remote_servers = true;
mail_smtpmode = "sendmail";
mail_sendmailmode = "pipe";
"memories.exiftool" = "/etc/profiles/per-user/nextcloud/bin/exiftool";
enabledPreviewProviders = [
"OC\\Preview\\Image"
"OC\\Preview\\HEIC"
"OC\\Preview\\TIFF"
"OC\\Preview\\MKV"
"OC\\Preview\\MP4"
"OC\\Preview\\AVI"
"OC\\Preview\\BMP"
"OC\\Preview\\GIF"
"OC\\Preview\\HEIC"
"OC\\Preview\\Image"
"OC\\Preview\\JPEG"
"OC\\Preview\\Krita"
"OC\\Preview\\MKV"
"OC\\Preview\\MP3"
"OC\\Preview\\MP4"
"OC\\Preview\\MarkDown"
"OC\\Preview\\Movie"
"OC\\Preview\\OpenDocument"
"OC\\Preview\\PNG"
"OC\\Preview\\TIFF"
"OC\\Preview\\TXT"
"OC\\Preview\\XBitmap"
];
};
phpExtraExtensions = all: [
@ -171,10 +187,11 @@ in
];
};
nginx.virtualHosts = {
"${config.services.nextcloud.hostName}" = lib.mkIf cfg.enableProxy {
"${cfg.host}" = lib.mkIf cfg.enableProxy {
forceSSL = true;
enableACME = true;
http2 = true;
default = true;
serverAliases = [ "cloud.rotehaare.art" ];
locations = {
"/".proxyWebsockets = true;
@ -214,6 +231,7 @@ in
};
};
};
};
};
virtualisation.oci-containers.containers = {
@ -261,7 +279,7 @@ in
nextcloud-cron.path = [ pkgs.perl ];
nextcloud-cronjob =
let
nextcloud-cronjob = inputs.jawz-scripts.packages.x86_64-linux.nextcloud-cronjob;
inherit (inputs.jawz-scripts.packages.x86_64-linux) nextcloud-cronjob;
in
{
description = "Runs various nextcloud-related cronjobs";