21 lines
334 B
Nix
21 lines
334 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.profiles.trusted;
|
|
in
|
|
{
|
|
config = lib.mkIf cfg.enable {
|
|
services.tailscale = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
useRoutingFeatures = "both"; # TODO
|
|
};
|
|
|
|
networking.firewall.trustedInterfaces = [
|
|
config.services.tailscale.interfaceName
|
|
];
|
|
};
|
|
}
|