This commit is contained in:
death916 2025-05-12 12:19:07 +00:00
parent 7ecc287863
commit 83ebcdc488

View file

@ -31,37 +31,32 @@ in
# --- Nextcloud Service Configuration ---
services.nextcloud = {
enable = true;
package = pkgs.nextcloud28; # Changed back to 28 for consistency, verify your actual package
hostName = "cloud.death916.xyz"; # This will be automatically added to trusted_domains by the module
https = false;
package = pkgs.nextcloud28; # Ensure this matches your desired Nextcloud version
hostName = "cloud.death916.xyz"; # Use the domain handled by the reverse proxy
https = false; # Disable HTTPS since the reverse proxy will handle it
datadir = nextcloudDataPath;
config = { # For direct config.php entries
config = {
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql";
dbname = "nextcloud";
dbpassFile = dbPassFilePath;
adminuser = "death916"; # Changed from ncadmin as per your file
adminuser = "death916";
adminpassFile = adminPassFilePath;
# 'overwriteprotocol' is a direct config.php key, so it belongs here for reverse proxy setups
# overwriteprotocol = "https";
# 'overwritehost' and 'overwrite.cli.url' would also go here if needed for reverse proxy
# overwritehost = "cloud.death916.xyz";
# "overwrite.cli.url" = "https://cloud.death916.xyz";
# 'trusted_proxies' would also go here for reverse proxy setup
trusted_proxies = [ "YOUR_REVERSE_PROXY_IP" ]; # e.g., "127.0.0.1" if on same machine
};
# 'trusted_domains' goes under 'settings'
extraConfig = {
"overwriteprotocol" = "https"; # Force HTTPS in Nextcloud
"overwritehost" = "cloud.death916.xyz"; # Set the reverse proxy hostname
"trusted_proxies" = [ "100.117.212.36" ]; # Replace with your reverse proxy's IP
"overwrite.cli.url" = "https://cloud.death916.xyz"; # Set the base URL
};
settings = {
trusted_domains = [
"cloud.death916.xyz"
# The module usually adds config.services.nextcloud.hostName and localhost automatically.
# If you want to be explicit and override:
# lib.mkForce [ "localhost" config.services.nextcloud.hostName "cloud.death916.xyz" ]
trusted_domains = [
"cloud.death916.xyz"
];
# Your Redis settings from before:
memcache.distributed = "\\OC\\Memcache\\Redis";
memcache.locking = "\\OC\\Memcache\\Redis";
filelocking.enabled = true;
@ -72,7 +67,6 @@ in
phpOptions = lib.mkForce { "memory_limit" = "2G"; };
};
users.users.nextcloud = { isSystemUser = true; group = "nextcloud"; };
users.groups.nextcloud = {};