Specify ip_prefixes for headscale
This commit is contained in:
parent
93c04e83d3
commit
641855afbf
@ -4,6 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.headscale;
|
cfg = config.modules.services.headscale;
|
||||||
|
fqdn = "headscale.vimium.net";
|
||||||
in {
|
in {
|
||||||
options.modules.services.headscale = {
|
options.modules.services.headscale = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@ -13,8 +14,27 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.headscale ];
|
||||||
|
|
||||||
|
services.headscale = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
port = 8080;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
ip_prefixes = [
|
||||||
|
"100.64.0.0/10"
|
||||||
|
];
|
||||||
|
server_url = "https://${fqdn}";
|
||||||
|
dns_config = {
|
||||||
|
base_domain = "vimium.net";
|
||||||
|
};
|
||||||
|
logtail.enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"headscale.vimium.net" = {
|
"${fqdn}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
@ -23,21 +43,5 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.headscale = {
|
|
||||||
enable = true;
|
|
||||||
port = 8080;
|
|
||||||
settings = {
|
|
||||||
server_url = "https://headscale.vimium.net";
|
|
||||||
dns_config = {
|
|
||||||
base_domain = "vimium.net";
|
|
||||||
};
|
|
||||||
logtail.enabled = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
config.services.headscale.package
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user