mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.services.derp: drop
This commit is contained in:
@@ -61,7 +61,6 @@ inputs:
|
||||
beesd."/" = {};
|
||||
bind = {};
|
||||
headscale = {};
|
||||
derp = {};
|
||||
tailscale = {};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user