aboutsummaryrefslogtreecommitdiff
path: root/vps-configuration.env.nix
diff options
context:
space:
mode:
Diffstat (limited to 'vps-configuration.env.nix')
-rw-r--r--vps-configuration.env.nix44
1 files changed, 20 insertions, 24 deletions
diff --git a/vps-configuration.env.nix b/vps-configuration.env.nix
index 2283449..304c124 100644
--- a/vps-configuration.env.nix
+++ b/vps-configuration.env.nix
@@ -7,9 +7,13 @@ let
letsencryptEmail = "$LETSENCRYPT_EMAIL";
authorizedKey = "$AUTHORIZED_KEY";
userPassword = "$USER_PASSWORD";
+ nextcloudDatabaseUser = "$NEXTCLOUD_DATABASE_USER";
nextcloudDatabasePassword = "$NEXTCLOUD_DATABASE_PASSWORD";
+ nextcloudAdminUser = "$NEXTCLOUD_ADMIN_USER";
nextcloudAdminPassword = "$NEXTCLOUD_ADMIN_PASSWORD";
+ nextcloudTablePrefix = "$NEXTCLOUD_TABLE_PREFIX";
gitRoot = "$GIT_ROOT";
+ systemStateVersion = "$SYSTEM_STATE_VERSION";
};
in {
imports = [ ./hardware-configuration.nix ];
@@ -57,45 +61,37 @@ in {
enableACME = true;
};
};
+ };
- gitweb = {
- enable = true;
- location = "";
- virtualHost = envsubstConfiguration.gitTLD;
- };
+ postgresql = {
+ enable = true;
+ ensureDatabases = [ "nextcloud" ];
+ package = pkgs.postgresql_11;
+ ensureUsers = [{
+ name = "nextcloud";
+ ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
+ }];
};
nextcloud = {
enable = true;
+ package = pkgs.nextcloud19;
+ nginx.enable = true;
hostName = envsubstConfiguration.nextcloudTLD;
https = true;
+ maxUploadSize = "4G";
autoUpdateApps.enable = true;
- autoUpdateApps.startAt = "05:00:00";
config = {
overwriteProtocol = "https";
dbtype = "pgsql";
- dbuser = "nextcloud";
dbhost = "/run/postgresql";
- dbname = "nextcloud";
+ dbuser = envsubstConfiguration.nextcloudDatabaseUser;
dbpass = envsubstConfiguration.nextcloudDatabasePassword;
- adminuser = "admin";
+ dbtableprefix = envsubstConfiguration.nextcloudTablePrefix;
+ adminuser = envsubstConfiguration.nextcloudAdminUser;
adminpass = envsubstConfiguration.nextcloudAdminPassword;
};
};
-
- postgresql = {
- enable = true;
- ensureDatabases = [ "nextcloud" ];
- ensureUsers = [{
- name = "nextcloud";
- ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
- }];
- };
-
- gitweb = {
- gitwebTheme = true;
- projectroot = envsubstConfiguration.gitRoot;
- };
};
systemd.services."nextcloud-setup" = {
@@ -111,5 +107,5 @@ in {
openssh.authorizedKeys.keys = [ envsubstConfiguration.authorizedKey ];
};
- system.stateVersion = "20.03";
+ system.stateVersion = envsubstConfiguration.systemStateVersion;
}