23 lines
390 B
Nix
23 lines
390 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.sydnix.tailscale;
|
|
in {
|
|
options = {
|
|
sydnix.tailscale = {
|
|
enable = mkEnableOption "Tailscale";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.tailscale.enable = true;
|
|
|
|
networking.firewall.trustedInterfaces = [
|
|
"36mtailscale0"
|
|
];
|
|
|
|
sydnix.impermanence.directories = [ "/var/lib/tailscale" ];
|
|
};
|
|
}
|