Reformatted with nixfmt

This commit is contained in:
alejandro-angulo 2025-03-31 22:34:25 -07:00
parent f51256c3ae
commit 3f16537322
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
80 changed files with 1454 additions and 992 deletions

View file

@ -3,11 +3,13 @@
pkgs,
lib,
...
}: let
}:
let
inherit (lib) mkIf;
cfg = config.aa.services.tailscale;
in {
in
{
options.aa.services.tailscale = with lib; {
enable = mkEnableOption "tailscale";
configureClientRouting = mkOption {
@ -35,18 +37,14 @@ in {
tailscale
tailscale-systray
];
networking.firewall.allowedUDPPorts = [config.services.tailscale.port];
networking.firewall.allowedUDPPorts = [ config.services.tailscale.port ];
services.tailscale = {
enable = true;
useRoutingFeatures = mkIf (cfg.configureClientRouting || cfg.configureServerRouting) (
if (cfg.configureClientRouting && cfg.configureServerRouting)
then "both"
if (cfg.configureClientRouting && cfg.configureServerRouting) then
"both"
else
(
if cfg.configureClientRouting
then "client"
else "server"
)
(if cfg.configureClientRouting then "client" else "server")
);
};
};