Created
July 5, 2020 15:12
-
-
Save CRTified/1b2dd623d48931ff584d237576531ab9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
services.postgresql = { | |
enable = true; | |
ensureDatabases = [ "nextcloud" ]; | |
ensureUsers = [ | |
{ name = "nextcloud"; | |
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; | |
} | |
]; | |
}; | |
services.nextcloud = { | |
enable = true; | |
package = pkgs.nextcloud18; | |
config = { | |
adminpassFile = "/var/lib/nextcloud/admin.txt"; | |
adminuser = "admin"; | |
extraTrustedDomains = [ "example.org" ]; | |
trustedProxies = [ "192.168.101.10" ]; | |
overwriteProtocol = "https"; | |
dbtype = "pgsql"; | |
dbuser = "nextcloud"; | |
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself | |
dbname = "nextcloud"; | |
}; | |
hostName = "example.org"; | |
https = false; # HTTPS is added in the reverse proxy | |
maxUploadSize = "5G"; | |
nginx.enable = true; | |
}; | |
systemd.services."nextcloud-setup" = { | |
requires = ["postgresql.service"]; | |
after = ["postgresql.service"]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment