nixos-config/services/tailscale.nix

18 lines
384 B
Nix

{
config,
lib,
...
}:
with lib;
{
config = mkIf (!config.isInstaller) {
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."services/tailscale/authKey".path;
};
sops.secrets."services/tailscale/authKey".sopsFile = ./tailscale.yaml;
environment.persistence."/persistent".directories = [
"/var/lib/tailscale"
];
};
}