From e67a646a925bc3cda86101a3f3afb81db3030ef5 Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 5 Dec 2021 22:56:22 +0100 Subject: treewide: add defaultText to remaining options these are mostly options that use alias bindings, bindings to constants, or bindings to calculated values. --- nixos/modules/services/misc/gitea.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nixos/modules/services/misc/gitea.nix') diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 938bb28da90..519bd8f5734 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -86,6 +86,11 @@ in port = mkOption { type = types.port; default = (if !usePostgresql then 3306 else pg.port); + defaultText = literalExpression '' + if config.${opt.database.type} != "postgresql" + then 3306 + else config.${options.services.postgresql.port} + ''; description = "Database host port."; }; -- cgit 1.4.1