Move tailscale to module
This commit is contained in:
@ -20,9 +20,10 @@
|
||||
./dev/zig.nix
|
||||
./editors/neovim
|
||||
./editors/vscode.nix
|
||||
./networking/tailscale.nix
|
||||
./security/gpg.nix
|
||||
./security/pass.nix
|
||||
./shell/git
|
||||
./shell/zsh
|
||||
];
|
||||
}
|
||||
}
|
||||
|
20
modules/networking/tailscale.nix
Normal file
20
modules/networking/tailscale.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let cfg = config.modules.networking.tailscale;
|
||||
in {
|
||||
options.modules.networking.tailscale = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.tailscale.enable = true;
|
||||
services.openssh.openFirewall = false;
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user