- Added OIDC app to Nextcloud with specific URL, SHA256, and license configuration for authentication support. - Configured Nginx to redirect `.well-known/webfinger` to Nextcloud for improved compatibility. - Updated Nextcloud settings to include `overwrite.cli.url` for proper URL handling.
82 lines
2.1 KiB
Nix
82 lines
2.1 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
systemd.services."nextcloud-setup".requires = [ "postgresql.service" ];
|
|
systemd.services."nextcloud-setup".after = [ "postgresql.service" ];
|
|
environment.systemPackages = with pkgs; [ ffmpeg ];
|
|
|
|
environment.etc."nextcloud-admin-pass".text = "test123";
|
|
|
|
services.nextcloud = {
|
|
enable = true;
|
|
package = pkgs.nextcloud32;
|
|
extraApps = {
|
|
inherit (config.services.nextcloud.package.packages.apps)
|
|
calendar
|
|
contacts
|
|
mail
|
|
notes
|
|
spreed
|
|
tasks
|
|
;
|
|
oidc = pkgs.fetchNextcloudApp {
|
|
sha256 = "sha256-RFlPJFwqv7TEoTZUc2vhP4AB7hh619EQ7vRdM+HDoBw=";
|
|
url = "https://github.com/H2CK/oidc/releases/download/1.13.1/oidc-1.13.1.tar.gz";
|
|
license = "afl3";
|
|
};
|
|
};
|
|
hostName = "nc.hoyer.xyz";
|
|
https = true;
|
|
configureRedis = true;
|
|
settings = {
|
|
"overwrite.cli.url" = "https://nc.hoyer.xyz";
|
|
maintenance_window_start = "1";
|
|
log_type = "file";
|
|
mail_smtpmode = "sendmail";
|
|
mail_sendmailmode = "pipe";
|
|
default_phone_region = "DE";
|
|
enabledPreviewProviders = [
|
|
"OC\\Preview\\BMP"
|
|
"OC\\Preview\\GIF"
|
|
"OC\\Preview\\HEIC"
|
|
"OC\\Preview\\JPEG"
|
|
"OC\\Preview\\JXL"
|
|
"OC\\Preview\\Krita"
|
|
"OC\\Preview\\MP3"
|
|
"OC\\Preview\\MP4"
|
|
"OC\\Preview\\MarkDown"
|
|
"OC\\Preview\\Movie"
|
|
"OC\\Preview\\OpenDocument"
|
|
"OC\\Preview\\PDF"
|
|
"OC\\Preview\\PNG"
|
|
"OC\\Preview\\TXT"
|
|
"OC\\Preview\\WEBP"
|
|
"OC\\Preview\\XBitmap"
|
|
];
|
|
};
|
|
phpOptions = {
|
|
upload_max_filesize = lib.mkForce "1G";
|
|
post_max_size = lib.mkForce "1G";
|
|
"opcache.interned_strings_buffer" = "16";
|
|
};
|
|
config.adminpassFile = "/etc/nextcloud-admin-pass";
|
|
config.dbtype = "pgsql";
|
|
config.dbname = "nextcloud";
|
|
config.dbhost = "/run/postgresql";
|
|
config.dbuser = "nextcloud";
|
|
};
|
|
|
|
services.postgresql = {
|
|
ensureDatabases = [ "nextcloud" ];
|
|
ensureUsers = [
|
|
{
|
|
name = "nextcloud";
|
|
ensureDBOwnership = true;
|
|
}
|
|
];
|
|
};
|
|
}
|