Files
nixos/modules/nixos/tailscale.nix
T
Greg Hellings 140ba3d08a Streamline base install
Don't install printers by default
Don't install NetworkManager by default, as it pulls in WAY too many
dependencies, including a full GUI suite
Simplify the template
2025-04-14 00:44:19 -05:00

22 lines
535 B
Nix

{ lib, config, ... }:
let
cfg = config.greg.tailscale;
in
{
options = {
greg.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
};
config = lib.mkIf cfg.enable {
services.tailscale.enable = true;
networking.firewall.checkReversePath = "loose";
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = "1";
"net.ipv6.conf.all.forwarding" = "1";
};
environment.systemPackages = [ config.services.tailscale.package ];
systemd.services.tailscaled.partOf = [ "network-online.target" ];
};
}