Reformatted with nixfmt
This commit is contained in:
parent
f51256c3ae
commit
3f16537322
80 changed files with 1454 additions and 992 deletions
|
@ -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")
|
||||
);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue