depot/cluster/services/ways/options/default.nix

19 lines
524 B
Nix
Raw Normal View History

2024-07-08 00:38:56 +03:00
{ config, lib, depot, ... }:
2024-07-04 02:57:36 +03:00
{
options.ways = lib.mkOption {
2024-07-08 00:38:56 +03:00
type = lib.types.attrsOf (lib.types.submodule ({ options, ... }: {
imports = [ ./way.nix ];
domainSuffixExternal = depot.lib.meta.domain;
domainSuffixInternal = "internal.${depot.lib.meta.domain}";
2024-07-08 00:38:56 +03:00
extras = lib.mkIf options.bucket.isDefined {
locations."/".extraConfig = ''
proxy_set_header Host "${options.bucket.value}.${config.links.garageWeb.hostname}";
'';
};
}));
2024-07-04 02:57:36 +03:00
default = {};
};
}