From cffffeb678e9a1078eeba0f19c9607cda9f31bed Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 7 Feb 2024 18:03:24 -0500 Subject: modules/nixos+darwin: move to traits + archetypes model --- modules/nixos/features/tailscale.nix | 37 ------------------------------------ 1 file changed, 37 deletions(-) delete mode 100644 modules/nixos/features/tailscale.nix (limited to 'modules/nixos/features/tailscale.nix') diff --git a/modules/nixos/features/tailscale.nix b/modules/nixos/features/tailscale.nix deleted file mode 100644 index 9eba428..0000000 --- a/modules/nixos/features/tailscale.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - secretsDir, - ... -}: let - cfg = config.features.tailscale; -in { - options.features.tailscale = { - enable = lib.mkEnableOption "Tailscale"; - ssh.enable = lib.mkEnableOption "Tailscale SSH"; - }; - - config = lib.mkIf cfg.enable { - age.secrets = lib.mkIf cfg.ssh.enable { - tailscaleAuthKey.file = "${secretsDir}/tailscaleAuthKey.age"; - }; - - networking.firewall = - { - trustedInterfaces = ["tailscale0"]; - } - // lib.optionalAttrs cfg.ssh.enable { - allowedTCPPorts = [22]; - }; - - services.tailscale = - { - enable = true; - openFirewall = true; - } - // lib.optionalAttrs cfg.ssh.enable { - authKeyFile = config.age.secrets.tailscaleAuthKey.path; - extraUpFlags = ["--ssh"]; - }; - }; -} -- cgit v1.2.3