mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 19:12:11 +02:00
27 lines
681 B
Nix
27 lines
681 B
Nix
# Tailscale is a VPN service that makes it easy to connect your devices between each other.
|
|
{ config, ... }: {
|
|
security.sudo.extraRules = [{
|
|
users = [ config.var.username ];
|
|
commands = [
|
|
{
|
|
command = "/etc/profiles/per-user/${config.var.username}/bin/tailscale";
|
|
options = [ "NOPASSWD" ];
|
|
}
|
|
{
|
|
command = "/run/current-system/sw/bin/tailscale";
|
|
options = [ "NOPASSWD" ];
|
|
}
|
|
];
|
|
}];
|
|
services.tailscale = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
networking.firewall = {
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
# required to connect to Tailscale exit nodes
|
|
checkReversePath = "loose";
|
|
};
|
|
}
|