nix-dotfiles/nixosModules/services/headscale/service.nix
Julia Lange b416affd1f
Caddy, DNS Challenges; Headscale, Magic_dns
Changed to using Porkbun DNS Challenges for Caddy. This enables wildcard
certificates. Documentation
- https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates
- https://caddyserver.com/docs/automatic-https#dns-challenge

Changed headscale to use a domain I own instead of the beautiful madoka
OP.
2025-09-18 08:18:34 -07:00

26 lines
658 B
Nix

{ config, lib, ... }:
{
options.headscale = {
enable = lib.mkEnableOption "Enable headscale";
server = {
port = lib.mkOption { default = 7204; };
domain = lib.mkOption { type = lib.types.str; };
};
};
config = lib.mkIf config.headscale.enable {
networking.firewall.allowedUDPPorts = [ 3478 ];
services.headscale = {
enable = true;
port = config.headscale.server.port;
settings = {
server_url = "https://${config.headscale.server.domain}";
dns = {
base_domain = "dns.${config.headscale.server.domain}";
override_local_dns = false;
};
};
};
};
}