nixos-configs/modules/caddy-plus/vhost-options.nix
matt1432 49dc072b81
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(modules): make sure nothing is added without setting enable
2025-01-04 19:02:30 -05:00

51 lines
1.3 KiB
Nix

cfg: {lib, ...}: let
inherit (lib) literalExpression mkOption types;
in {
options = {
reverseProxy = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Option to give the parameters to a simple "reverse_proxy" command
appended after extraConfig.
'';
};
subDomains = mkOption {
type = types.attrsOf (types.submodule (import ./sub-domain-options.nix cfg));
default = {};
example = literalExpression ''
{
headscale = {
reverseProxy = "localhost:8080";
extraConfig = '''
encode gzip
''';
}
};
'';
description = ''
Declarative specification of a virtual hosts subdomain served by Caddy.
'';
};
subDirectories = mkOption {
type = types.attrsOf (types.submodule (import ./sub-dir-options.nix cfg));
default = {};
example = literalExpression ''
{
headscale = {
appSupport = false;
reverseProxy = "localhost:8080";
extraConfig = '''
encode gzip
''';
};
};
'';
description = ''
Declarative specification of a subdomain's subdirectories served by Caddy.
'';
};
};
}