diff options
author | Karel Kočí <cynerd@email.cz> | 2024-01-27 13:20:32 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2024-01-27 13:20:32 +0100 |
commit | 84ebec29f2fa351d16085b78910bca34db9c16ae (patch) | |
tree | eb4a873c005cd9ea7f9a9eef744082115414c054 | |
parent | fc100c5a7eab90d02edc21f6703108f414fa0aaf (diff) | |
download | nixos-personal-84ebec29f2fa351d16085b78910bca34db9c16ae.tar.gz nixos-personal-84ebec29f2fa351d16085b78910bca34db9c16ae.tar.bz2 nixos-personal-84ebec29f2fa351d16085b78910bca34db9c16ae.zip |
nixos/lipwig: migrate nextcloud to postgresql database
-rw-r--r-- | nixos/machine/lipwig.nix | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/nixos/machine/lipwig.nix b/nixos/machine/lipwig.nix index fe101f4..5b1a369 100644 --- a/nixos/machine/lipwig.nix +++ b/nixos/machine/lipwig.nix @@ -133,34 +133,6 @@ scan-path=/var/lib/git/repositories/ ''; - # CalDAV and CardDAV ####################################################### - # TODO vdirsyncer needs CA - services.radicale = { - enable = true; - rights.cynerd = { - user = "cynerd"; - collection = ".*"; - permission = "rw"; - }; - settings = { - server.hosts = ["0.0.0.0:5232" "[::]:5232"]; - encoding = { - request = "utf-8"; - stock = "utf-8"; - }; - auth = { - type = "htpasswd"; - htpasswd_filename = "${config.personal-secrets}/unencrypted/radicale.users"; - htpasswd_encryption = "bcrypt"; - delay = 1; - }; - storage = { - filesystem_folder = "/var/lib/radicale/"; - }; - web.type = "none"; - }; - }; - # Nextcloud ################################################################ services.nextcloud = { enable = true; @@ -171,11 +143,15 @@ config = { adminuser = "cynerd"; adminpassFile = "/run/secrets/nextcloud.admin.pass"; + dbtype = "pgsql"; + dbhost = "/run/postgresql"; + dbtableprefix = "oc_"; }; extraOptions = { #log_type = "systemd"; default_phone_region = "CZ"; }; + phpExtraExtensions = php: [php.pgsql php.pdo_pgsql]; phpOptions = { "opcache.interned_strings_buffer" = "16"; }; @@ -184,13 +160,17 @@ extraApps = { inherit (config.services.nextcloud.package.packages.apps) + bookmarks calendar contacts cookbook deck groupfolders + maps + memories notes phonetrack + previewgenerator tasks twofactor_nextcloud_notification twofactor_webauthn @@ -202,6 +182,19 @@ }; }; }; + environment.systemPackages = with pkgs; [exiftool ffmpeg-headless nodejs]; + + # Postgresql ############################################################### + services.postgresql = { + enable = true; + ensureUsers = [ + { + name = "nextcloud"; + ensureDBOwnership = true; + } + ]; + ensureDatabases = ["nextcloud"]; + }; # Old Syncthing ############################################################ services.syncthing = { |