31 lines
514 B
Nix
31 lines
514 B
Nix
{ config, lib, pkgs, ... }:
|
|||
|
|
|
||
|
|
{
|
||
|
|
services.headscale = {
|
||
|
|
enable = true;
|
||
|
|
settings = {
|
||
|
|
server_url = "https://vpn.grasswren.net";
|
||
|
|
listen_addr = "127.0.0.1:8080";
|
||
|
|
|
||
|
|
database.type = "sqlite";
|
||
|
|
|
||
|
|
ip_prefixes = [
|
||
|
|
"100.64.0.0/10"
|
||
|
|
"fd7a:115c:a1e0::/48"
|
||
|
|
];
|
||
|
|
|
||
|
|
dns = {
|
||
|
|
magic_domain = true;
|
||
|
|
base_domain = "vpn.grasswren.net";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
services.caddy = {
|
||
|
|
enable = true;
|
||
|
|
virtualHosts."vpn.grasswren.net".extraConfig = ''
|
||
|
|
reverse_proxy localhost:8080
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
}
|