From 8ad19f72fc931c8bcc1d7f825064b80220675e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 29 Oct 2023 14:12:10 +0100 Subject: [PATCH] fix: small nextcloud fixes * Add admin pass * Increase max post size * Fix secret owner --- hosts/nachtigall/apps/nextcloud.nix | 18 +++++++++++++++--- secrets/nextcloud-admin-pass.age | 27 +++++++++++++++++++++++++++ secrets/secrets.nix | 1 + 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 secrets/nextcloud-admin-pass.age diff --git a/hosts/nachtigall/apps/nextcloud.nix b/hosts/nachtigall/apps/nextcloud.nix index ca9ac871..51869e09 100644 --- a/hosts/nachtigall/apps/nextcloud.nix +++ b/hosts/nachtigall/apps/nextcloud.nix @@ -1,9 +1,20 @@ -{ config, pkgs, ... }: +{ + config, + pkgs, + flake, + ... +}: { age.secrets."nextcloud-secrets" = { file = "${flake.self}/secrets/nextcloud-secrets.age"; mode = "400"; - owner = config.services.mastodon.user; + owner = "nextcloud"; + }; + + age.secrets."nextcloud-admin-pass" = { + file = "${flake.self}/secrets/nextcloud-admin-pass.age"; + mode = "400"; + owner = "nextcloud"; }; services.nginx.virtualHosts."cloud.pub.solar" = { @@ -18,7 +29,7 @@ enable = true; https = true; secretFile = config.age.secrets."nextcloud-secrets".path; # secret - phpPackage = pkgs.php82; + maxUploadSize = "1G"; configureRedis = true; @@ -28,6 +39,7 @@ config = { adminuser = "admin"; + adminpassFile = config.age.secrets."nextcloud-admin-pass".path; dbuser = "nextcloud"; dbtype = "pgsql"; dbname = "nextcloud"; diff --git a/secrets/nextcloud-admin-pass.age b/secrets/nextcloud-admin-pass.age new file mode 100644 index 00000000..30d16298 --- /dev/null +++ b/secrets/nextcloud-admin-pass.age @@ -0,0 +1,27 @@ +age-encryption.org/v1 +-> ssh-ed25519 iDKjwg 1a8hvqTn2un3yxJkdltenSSfEhKMHxXAKlfSnD9vCWo +xOzDWr87QMnE9UgnNimz/C+5a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abFmOpUc+TCAFKQYFmlPokmFyqYiD0W9hELvOXv24 +QJ3LX0bqOgujAB/2T//oCctA/fv1Jc8WugVu6iM9gxE +-> x\:P|P,}-grease @YO [b'lw5 *.WKU +hfTYY2Pu +--- vCfB3aNBGwwBSvtdjzAUKCzCt/z7YvufcAf/VhaZfcg +a9r_GMSs#(;a(y&|!wiG!e4xc \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 5b060b56..2b0bdc9b 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -37,4 +37,5 @@ in { "matrix-synapse-secret-config.yaml.age".publicKeys = nachtigallKeys ++ baseKeys; "nextcloud-secrets.age".publicKeys = nachtigallKeys ++ baseKeys; + "nextcloud-admin-pass.age".publicKeys = nachtigallKeys ++ baseKeys; }