{ pkgs, config, lib, ... }: { #imports = [ agenix.nixosModules.default ]; options = { modules.system.tailscale.enable = lib.mkEnableOption "enables tailscale"; }; config = lib.mkIf config.modules.system.tailscale.enable { age.secrets."tailscale_authkey" = { file = ../../secrets/tailscale_authkey.txt.age; owner = "blake"; group = "blake"; mode = "0400"; }; services.tailscale = { enable = true; }; useRoutingFeatures = "both"; authKeyFile = "/run/agenix/tailscale_authkey"; }; }