specify proto in tests as module option too

This commit is contained in:
ibizaman 2025-07-11 10:15:30 +02:00 committed by Pierre Penninckx
parent 8d85cbd1be
commit b57ea2bda3

View file

@ -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