2024-08-30 01:17:50 -04:00
|
|
|
{pkgs, outputs, ...}: {
|
2024-08-26 13:07:59 -04:00
|
|
|
services = {
|
|
|
|
nextcloud = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.nextcloud29;
|
2024-08-30 01:17:50 -04:00
|
|
|
hostName = "cloud.${outputs.secrets.jimDomain}";
|
2024-08-26 13:07:59 -04:00
|
|
|
datadir = "/mnt/nextcloud";
|
|
|
|
https = true;
|
|
|
|
config = {
|
|
|
|
adminuser = "jimbo";
|
2024-09-11 00:59:16 -04:00
|
|
|
adminpassFile = "/mnt/nextcloud/password.txt";
|
2024-08-26 13:07:59 -04:00
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
trusted_proxies = [ "127.0.0.1" ];
|
2024-08-30 01:17:50 -04:00
|
|
|
trusted_domains = [ "cloud.${outputs.secrets.jimDomain}" ];
|
2024-08-26 13:07:59 -04:00
|
|
|
overwriteprotocol = "https";
|
2024-08-30 01:17:50 -04:00
|
|
|
mail_smtphost = "mx.${outputs.secrets.jimDomain}";
|
|
|
|
mail_domain = "${outputs.secrets.jimDomain}";
|
2024-08-26 13:07:59 -04:00
|
|
|
mail_from_address = "noreply";
|
|
|
|
mail_smtpauth = "true";
|
2024-08-30 01:17:50 -04:00
|
|
|
mail_smtpname = "noreply@${outputs.secrets.jimDomain}";
|
|
|
|
mail_smtppassword = outputs.secrets.noreplyPassword;
|
2024-08-26 13:07:59 -04:00
|
|
|
mail_smtpmode = "smtp";
|
|
|
|
mail_smtpport = 587;
|
|
|
|
};
|
|
|
|
};
|
2024-10-07 11:42:34 -04:00
|
|
|
|
2024-08-30 01:17:50 -04:00
|
|
|
nginx.virtualHosts."cloud.${outputs.secrets.jimDomain}" = {
|
2024-08-26 13:07:59 -04:00
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyWebsockets = true;
|
|
|
|
extraConfig = "
|
|
|
|
location /.well-known/carddav {
|
|
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
|
|
}
|
|
|
|
location /.well-known/caldav {
|
|
|
|
return 301 $scheme://$host/remote.php/dav;
|
|
|
|
}
|
|
|
|
";
|
|
|
|
};
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|