Update headscale config

This commit is contained in:
Jordan Holt 2024-08-25 18:40:15 +01:00
parent e5685cb361
commit f91c0a33e2
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520

View File

@ -1,19 +1,17 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.modules.services.headscale; cfg = config.modules.services.headscale;
fqdn = "headscale.vimium.net"; fqdn = "headscale.vimium.net";
in { in {
options.modules.services.headscale = { options.modules.services.headscale = {
enable = mkOption { enable = lib.mkOption {
default = false; default = false;
example = true; example = true;
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.headscale ]; environment.systemPackages = [ pkgs.headscale ];
services.headscale = { services.headscale = {
@ -22,10 +20,16 @@ in {
port = 8080; port = 8080;
settings = { settings = {
acl_policy_path = null;
ip_prefixes = [ ip_prefixes = [
"100.64.0.0/10" "100.64.0.0/10"
]; ];
server_url = "https://${fqdn}"; server_url = "https://${fqdn}";
derp = {
auto_update_enable = false;
update_frequency = "24h";
urls = [];
};
dns_config = { dns_config = {
base_domain = "vimium.net"; base_domain = "vimium.net";
extra_records = [ extra_records = [
@ -40,6 +44,10 @@ in {
value = "100.64.0.7"; value = "100.64.0.7";
} }
]; ];
magic_dns = true;
nameservers = [
"9.9.9.9"
];
}; };
logtail.enabled = false; logtail.enabled = false;
}; };