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, ... }: {
|
2024-07-04 19:12:52 +03:00
|
|
|
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 = {};
|
|
|
|
};
|
|
|
|
}
|