From 755af4c6997ac417bdb1d0f11dda4bd9f5f1c696 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 23 Sep 2020 14:50:45 -0300 Subject: Use SQLite instead of PostgreSQL: simplify operations and backup --- vps-configuration.nix | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'vps-configuration.nix') diff --git a/vps-configuration.nix b/vps-configuration.nix index 978bbd0..b1ada60 100644 --- a/vps-configuration.nix +++ b/vps-configuration.nix @@ -169,16 +169,6 @@ in { }; }; - postgresql = { - enable = true; - ensureDatabases = [ "nextcloud" ]; - package = pkgs.postgresql_11; - ensureUsers = [{ - name = "nextcloud"; - ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; - }]; - }; - nextcloud = { enable = true; package = pkgs.nextcloud19; @@ -189,11 +179,7 @@ in { autoUpdateApps.enable = true; config = { overwriteProtocol = "https"; - dbtype = "pgsql"; - dbhost = "/run/postgresql"; - dbuser = "nextcloud"; - dbpassFile = "/data/secrets/nextcloud-database.txt"; - dbtableprefix = "euandreh_nextcloud_"; + dbtype = "sqlite"; adminuser = "andreh"; adminpassFile = "/data/secrets/nextcloud-admin.txt"; }; @@ -249,6 +235,7 @@ in { server_name = config.matrixDomain; # I created the new user by temporarily setting this to true enable_registration = false; + database_type = "sqlite3"; listeners = [{ port = config.matrixPort; bind_address = "::1"; @@ -270,13 +257,6 @@ in { }; }; - systemd.services = { - "nextcloud-setup" = { - requires = [ "postgresql.service" ]; - after = [ "postgresql.service" ]; - }; - }; - users = { mutableUsers = false; extraUsers.andreh = { -- cgit v1.2.3