From b57ea2bda325513a2e539d307c51f180ca045f9e Mon Sep 17 00:00:00 2001 From: ibizaman Date: Fri, 11 Jul 2025 10:15:30 +0200 Subject: [PATCH] specify proto in tests as module option too --- test/common.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/common.nix b/test/common.nix index dedb645..4aceaea 100644 --- a/test/common.nix +++ b/test/common.nix @@ -1,7 +1,7 @@ { pkgs, lib }: let inherit (lib) hasAttr mkOption optionalString; - inherit (lib.types) enum listOf nullOr submodule str; + inherit (lib.types) bool enum listOf nullOr submodule str; baseImports = { imports = [ @@ -165,6 +165,20 @@ in readOnly = true; default = "${config.test.subdomain}.${config.test.domain}"; }; + hasSSL = mkOption { + type = bool; + default = false; + }; + proto = mkOption { + type = str; + readOnly = true; + default = if config.test.hasSSL then "https" else "http"; + }; + proto_fqdn = mkOption { + type = str; + readOnly = true; + default = "${config.test.proto}://${config.test.fqdn}"; + }; }; imports = [ baseImports