add adguardhome
This commit is contained in:
@@ -25,9 +25,17 @@ let
|
||||
locations = lib.mkOption {
|
||||
type = lib.types.attrsOf types.location;
|
||||
};
|
||||
tailscaleAuth = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
tailscaleAuthVhosts = lib.attrNames (
|
||||
lib.filterAttrs (name: { tailscaleAuth, ... }: tailscaleAuth) cfg.vHosts
|
||||
);
|
||||
in
|
||||
{
|
||||
options.services.webserver = {
|
||||
@@ -56,8 +64,13 @@ in
|
||||
recommendedZstdSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
|
||||
tailscaleAuth = {
|
||||
enable = (lib.length tailscaleAuthVhosts) > 0;
|
||||
virtualHosts = tailscaleAuthVhosts;
|
||||
};
|
||||
|
||||
virtualHosts = lib.mapAttrs
|
||||
(_: { proxyBuffering, locations }: {
|
||||
(_: { proxyBuffering, locations, ... }: {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
http2 = true;
|
||||
|
||||
Reference in New Issue
Block a user