modules.services.derp: drop

This commit is contained in:
2025-11-06 20:19:52 +08:00
parent ee0beeab98
commit 4ddb4a226f
2 changed files with 0 additions and 45 deletions

View File

@@ -61,7 +61,6 @@ inputs:
beesd."/" = {};
bind = {};
headscale = {};
derp = {};
tailscale = {};
};
};

View File

@@ -1,44 +0,0 @@
inputs:
{
options.nixos.services.derp = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule { options =
{
hostname = mkOption { type = types.nonEmptyStr; default = "derp.headscale.chn.moe"; };
};});
default = null;
};
config = let inherit (inputs.config.nixos.services) derp; in inputs.lib.mkIf (derp != null)
{
services.tailscale.derper =
{
enable = true;
domain = derp.hostname;
configureNginx = false;
# TODO: set after tailscale works
# verifyClients = true;
};
nixos.services.nginx =
{
https.${derp.hostname} =
{
global =
{
rewriteHttps = false;
extraConfig =
''
proxy_buffering off;
proxy_read_timeout 3600s;
'';
};
location."/".proxy =
{
upstream = "http://127.0.0.1:${builtins.toString inputs.config.services.tailscale.derper.port}";
websocket = true;
};
};
http.${derp.hostname}.proxy.upstream =
"http://127.0.0.1:${builtins.toString inputs.config.services.tailscale.derper.port}";
};
};
}