kubernetes-deployments/modules/tailscale.nix

25 lines
582 B
Nix
Raw Normal View History

2024-10-28 15:05:06 +00:00
{
nixhelm,
system,
config,
lib,
...
}: {
2024-09-07 10:35:02 +00:00
options.tailscale.enable = lib.mkEnableOption "tailscale";
config = lib.mkIf config.tailscale.enable {
kubernetes = {
helm.releases.tailscale = {
chart = nixhelm.chartsDerivations.${system}.tailscale.tailscale-operator;
includeCRDs = true;
namespace = "tailscale";
};
resources.secrets.operator-oauth.stringData = {
client_id = "ref+sops://secrets.yml#/tailscale/clientID";
client_secret = "ref+sops://secrets.yml#/tailscale/clientSecret";
};
};
};
}