nixos/nextcloud: better json typechecking
this now uses the pkgs.formats.json instead of the builtin function to serialise json, which comes with a type signature that we can pass to mkOptions
This commit is contained in:
parent
727bdd736c
commit
83a669a0be
1 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,8 @@ let
|
|||
cfg = config.services.nextcloud;
|
||||
fpm = config.services.phpfpm.pools.nextcloud;
|
||||
|
||||
jsonFormat = pkgs.formats.json {};
|
||||
|
||||
phpPackage = pkgs.php74.buildEnv {
|
||||
extensions = { enabled, all }:
|
||||
(with all;
|
||||
|
@ -369,7 +371,7 @@ in {
|
|||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = with types; attrsOf anything;
|
||||
type = jsonFormat.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Extra options which should be appended to nextcloud's config.php file.
|
||||
|
@ -390,7 +392,8 @@ in {
|
|||
default = null;
|
||||
description = ''
|
||||
Secret options which will be appended to nextcloud's config.php file (written as JSON, in the same
|
||||
form as the `extraOptions` option), for example '{"redis":{"password":"secret","timeout"=2}}'.
|
||||
form as the <xref linkend="opt-services.nextcloud.extraOptions"/> option), for example
|
||||
'{"redis":{"password":"secret","timeout"=2}}'.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue