Merge branch 'nextcloud' into 'main'

Nextcloud

See merge request nounous/nixos!80
merge-requests/80/merge
Pyjacpp 2026-08-19 22:56:21 +02:00
commit e6f4c5cfce
2 changed files with 23 additions and 2 deletions

View File

@ -20,7 +20,7 @@
configureRedis = true; configureRedis = true;
hostName = "nextcloud.crans.org"; hostName = "nextcloud.crans.org";
https = false; https = true;
maxUploadSize = "4G"; maxUploadSize = "4G";
@ -42,10 +42,23 @@
# hodaur # hodaur
"172.16.10.145" "172.16.10.145"
]; ];
};
mail_domain = "crans.org";
mail_from_address = "root";
mail_smtphost = "smtp.crans.org";
mail_smtpport = 25;
};
appstoreEnable = true; appstoreEnable = true;
extraAppsEnable = true; extraAppsEnable = true;
}; };
# Activation CORS pour récuppérer les agendas depuis le wiki
# TODO: à mettre que sur /remote.php/dav/public-calendars/ pour éviter des requêtes malveillantes depuis le wiki.
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.extraConfig = ''
add_header 'Access-Control-Allow-Origin' 'https://mediawiki.crans.org' always;
add_header 'Access-Control-Allow-Methods' 'GET' always;
add_header 'Access-Control-Allow-Credentials' 'false' always;
add_header 'Vary' 'Origin' always;
'';
} }

View File

@ -6,5 +6,13 @@
recommendedOptimisation = true; recommendedOptimisation = true;
clientMaxBodySize = "512M"; clientMaxBodySize = "512M";
# On trust nos ip internes pour bien indiquer le client au bout
# i.e. on considère pas le reverseproxy comme notre client
appendHttpConfig = ''
set_real_ip_from 172.16.0.0/16;
set_real_ip_from fd00::/56;
real_ip_header X-Real-Ip;
'';
}; };
} }