Since Jude is a now a server, we rename it to Zeke, for Ezekiel Update of tailscale to auto-register nodes Update kubernetes to install the etcd application Update Zeke IP address and DNS bindings
28 lines
758 B
Nix
28 lines
758 B
Nix
{ lib, config, ... }:
|
|
|
|
let
|
|
cfg = config.greg.tailscale;
|
|
in
|
|
{
|
|
options = {
|
|
greg.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
age.secrets.tailscale-key.file = ../../secrets/tailscale.age;
|
|
boot.kernel.sysctl = {
|
|
"net.ipv4.ip_forward" = "1";
|
|
"net.ipv6.conf.all.forwarding" = "1";
|
|
};
|
|
environment.systemPackages = [ config.services.tailscale.package ];
|
|
networking.firewall.checkReversePath = "loose";
|
|
services.tailscale = {
|
|
enable = true;
|
|
authKeyFile = config.age.secrets.tailscale-key.path;
|
|
authKeyParameters.preauthorized = true;
|
|
useRoutingFeatures = "both";
|
|
};
|
|
systemd.services.tailscaled.partOf = [ "network-online.target" ];
|
|
};
|
|
}
|