diff options
| author | seth <[email protected]> | 2024-02-07 18:03:24 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-07 18:27:45 -0500 |
| commit | cffffeb678e9a1078eeba0f19c9607cda9f31bed (patch) | |
| tree | 8b8f68aa357becad06845f15b7e528474041371c /modules/nixos/features/tailscale.nix | |
| parent | 48712d44fde91d2685089cca7f9d88295fd59817 (diff) | |
modules/nixos+darwin: move to traits + archetypes model
Diffstat (limited to 'modules/nixos/features/tailscale.nix')
| -rw-r--r-- | modules/nixos/features/tailscale.nix | 37 |
1 files changed, 0 insertions, 37 deletions
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"]; - }; - }; -} |
