feat: add headscale
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
aa6694e9ff
commit
5c7bc8bc8d
1 changed files with 24 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
|
|
@ -14,6 +14,29 @@
|
||||||
networking.hostName = "hosting-01";
|
networking.hostName = "hosting-01";
|
||||||
networking.nameservers = [ "8.8.8.8" ];
|
networking.nameservers = [ "8.8.8.8" ];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
headscale = {
|
||||||
|
enable = true;
|
||||||
|
address = "0.0.0.0";
|
||||||
|
port = 8080;
|
||||||
|
settings = {
|
||||||
|
server_url = "https://headscale.escapeangle.com";
|
||||||
|
dns = {
|
||||||
|
base_domain = "tailnet.escapeangle.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx.virtualHosts."headscale.escapeangle.com" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${toString config.services.headscale.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
security.acme.defaults.email = "landervandenbulcke@gmail.com";
|
security.acme.defaults.email = "landervandenbulcke@gmail.com";
|
||||||
security.acme.acceptTerms = true;
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue