2023-08-05 09:56:57 -07:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
baseDomain = "nickiel.net";
|
|
|
|
domain = "headscale.${baseDomain}";
|
|
|
|
in {
|
2023-08-07 15:35:21 -07:00
|
|
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
|
|
|
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
|
2023-08-05 10:03:18 -07:00
|
|
|
# https://carjorvaz.com/posts/setting-up-headscale-on-nixos/
|
2023-08-05 09:56:57 -07:00
|
|
|
services.headscale = {
|
|
|
|
enable = true;
|
|
|
|
address = "0.0.0.0";
|
|
|
|
port = 8082;
|
|
|
|
settings = {
|
|
|
|
server_url = "https://${domain}";
|
|
|
|
dns_config.base_domain = baseDomain;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
environment.systemPackages = [ config.services.headscale.package ];
|
|
|
|
}
|