summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-12-09 19:54:43 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2020-12-09 19:54:43 +0100
commit81662d4798fb806522f295a338dc3916d962f57e (patch)
tree49e3b363accc30e1a4558bd4c8560d57fce78f37 /nixos/modules
parentace2457eafa8169ed9495251d28371b37eb71fa5 (diff)
nixos/nextcloud: improve error message for invalid `dbpassFile`
`file_exists` also returns `FALSE` if the file is in a directory that can't be read by the user. This e.g. happens if permissions for `nixops(1)`-deployment keys aren't configured correctly. This patch improves the error message for invalid files to avoid confusion[1]. [1] https://discourse.nixos.org/t/nixops-deploy-secrets-to-nextcloud/10414/4
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/web-apps/nextcloud.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix
index 53c2ab76fdfa..0dad85d681a9 100644
--- a/nixos/modules/services/web-apps/nextcloud.nix
+++ b/nixos/modules/services/web-apps/nextcloud.nix
@@ -391,7 +391,9 @@ in {
$file = "${c.dbpassFile}";
if (!file_exists($file)) {
throw new \RuntimeException(sprintf(
- "Cannot start Nextcloud, dbpass file %s set by NixOS doesn't exist!",
+ "Cannot start Nextcloud, dbpass file %s set by NixOS doesn't seem to "
+ . "exist! Please make sure that the file exists and has appropriate "
+ . "permissions for user & group 'nextcloud'!",
$file
));
}