about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/services/default.nix2
-rw-r--r--modules/services/tailscale/default.nix13
2 files changed, 14 insertions, 1 deletions
diff --git a/modules/services/default.nix b/modules/services/default.nix
index d34f57a..9a5338b 100644
--- a/modules/services/default.nix
+++ b/modules/services/default.nix
@@ -1 +1 @@
-{ ... }: { imports = [ ./ssh-server ]; }
+{ ... }: { imports = [ ./ssh-server ./tailscale ]; }
diff --git a/modules/services/tailscale/default.nix b/modules/services/tailscale/default.nix
new file mode 100644
index 0000000..cad1cad
--- /dev/null
+++ b/modules/services/tailscale/default.nix
@@ -0,0 +1,13 @@
+{ config, lib, ... }:
+let cfg = config.my.services.tailscale;
+in {
+
+  options.my.services.tailscale = with lib; {
+    enable = mkEnableOption "tailscale configuration";
+  };
+
+  config = lib.mkIf cfg.enable {
+    services.tailscale.enable = true;
+    networking.firewall.trustedInterfaces = [ "tailscale0" ];
+  };
+}