From 6d8936dd7b7582c0a4d13e3ac895131f837f58ec Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 12 Nov 2023 17:10:17 +0900 Subject: feat(modules/tailscale): init --- modules/services/tailscale.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/services/tailscale.nix diff --git a/modules/services/tailscale.nix b/modules/services/tailscale.nix new file mode 100644 index 0000000..8778524 --- /dev/null +++ b/modules/services/tailscale.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.modules.services.tailscale; +in +{ + options.modules.services.tailscale = { + enable = mkEnableOption "tailscale"; + }; + + config = mkIf cfg.enable { + services.tailscale = { + enable = true; + useRoutingFeatures = "both"; + }; + + environment.persistence."/persist".directories = [ + "/var/lib/tailscale" + ]; + }; +} -- cgit 1.4.1