nixcfg/nixosModules/services/tailscale/default.nix

20 lines
441 B
Nix
Raw Normal View History

2024-04-30 14:53:17 -04:00
{
pkgs,
lib,
config,
...
}: {
options = {
alyraffauf.services.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
};
config = lib.mkIf config.alyraffauf.services.tailscale.enable {
2024-06-09 00:51:09 -04:00
age.secrets.tailscaleAuthKey.file = ../../../secrets/tailscale/authKeyFile.age;
2024-04-30 14:53:17 -04:00
services.tailscale = {
enable = true;
openFirewall = true;
2024-06-09 00:51:09 -04:00
authKeyFile = config.age.secrets.tailscaleAuthKey.path;
2024-04-30 14:53:17 -04:00
};
};
}