Added more comments

This commit is contained in:
Serĉanto de Scio 2019-12-17 11:04:29 +10:00
parent 6c06eacc08
commit 71b8852589
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -14,22 +14,22 @@
hostName = "cloud.mcwhirter.io"; # FQDN for the Nextcloud instance hostName = "cloud.mcwhirter.io"; # FQDN for the Nextcloud instance
nginx.enable = true; # Whether to enable nginx virtual host management nginx.enable = true; # Whether to enable nginx virtual host management
config = { # Configure Nextcloud config = { # Configure Nextcloud
dbtype = "pgsql"; # Set database type dbtype = "pgsql"; # Set the database type
dbname = "nextcloud"; dbname = "nextcloud"; # Set the database name
dbhost = "/run/postgresql"; dbhost = "/run/postgresql"; # Set the database connection
dbuser = "nextcloud"; dbuser = "nextcloud"; # Set the database user
dbpassFile = "/run/keys/nextcloud-dbpass"; # Where to find the password dbpassFile = "/run/keys/nextcloud-dbpass"; # Where to find the database password
adminpassFile = "/run/keys/nextcloud-admin"; # Where to find the password adminpassFile = "/run/keys/nextcloud-admin"; # Where to find the admin password
adminuser = "root"; adminuser = "root"; # Set the admin user name
overwriteProtocol = "https"; # Force Nextcloud to always use HTTPS overwriteProtocol = "https"; # Force Nextcloud to always use HTTPS
}; };
}; };
services.postgresql = { services.postgresql = {
enable = true; # Ensure postgresql is enabled enable = true; # Ensure postgresql is enabled
ensureDatabases = [ "nextcloud" ]; ensureDatabases = [ "nextcloud" ]; # Ensure the database exists
ensureUsers = [ ensureUsers = [
{ name = "nextcloud"; { name = "nextcloud"; # Ensure the database user exists
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
} }
]; ];
@ -62,6 +62,6 @@
users.groups.keys.members = [ "nextcloud" ]; # Required due to NixOps issue #1204 users.groups.keys.members = [ "nextcloud" ]; # Required due to NixOps issue #1204
users.groups.nextcloud.members = [ "nextcloud" ]; # Added for keys permissions users.groups.nextcloud.members = [ "nextcloud" ]; # Added for keys permissions
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; # Open the required firewall ports
} }