diff --git a/deployment/default.nix b/deployment/default.nix index 3f8e550a..dbfa4610 100644 --- a/deployment/default.nix +++ b/deployment/default.nix @@ -38,8 +38,12 @@ panelConfigNullable: let inherit (lib) mkIf; + ## The convertor from module options to JSON schema does not generate proper + ## JSON schema types, forcing us to use nullable fields for default values. + ## However, working with those fields in the deployment code is annoying (and + ## unusual for Nix programmers), so we sanitize the input here and add back + ## the default value by hand. nonNull = x: v: if x == null then v else x; - panelConfig = { domain = nonNull panelConfigNullable.domain "fediversity.net"; initialUser = nonNull panelConfigNullable.initialUser {