From d34a180efe4687cc141d9ea339cebbb2b42c9056 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sun, 12 Jun 2022 04:59:12 +0000 Subject: [PATCH] Add tailscale support to linode --- hosts/linode/default.nix | 1 + modules/default.nix | 1 + modules/tailscale.nix | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 modules/tailscale.nix diff --git a/hosts/linode/default.nix b/hosts/linode/default.nix index 2ab58f5..ae0a13c 100644 --- a/hosts/linode/default.nix +++ b/hosts/linode/default.nix @@ -10,6 +10,7 @@ ]; greg.home = false; greg.linode.enable = true; + greg.tailscale.enable = true; networking.hostName = "linode"; networking.domain = "thehellings.com"; } diff --git a/modules/default.nix b/modules/default.nix index 8124384..2a2d0c4 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,6 +7,7 @@ ./linode.nix ./proxy.nix ./rpi4.nix + ./tailscale.nix ./xprograms.nix ]; } diff --git a/modules/tailscale.nix b/modules/tailscale.nix new file mode 100644 index 0000000..54e34b1 --- /dev/null +++ b/modules/tailscale.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: + +let + cfg = config.greg.tailscale; +in { + options = { + greg.tailscale.enable = lib.mkEnableOption "Enable Tailscale"; + }; + + config = lib.mkIf cfg.enable { + services.tailscale.enable = true; + networking.firewall.checkReversePath = "loose"; + }; +}