about summary refs log tree commit diff
path: root/modules/services/tailscale.nix
blob: 8778524b5fd0fb536a5c1c9374027c145c5be1fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"
    ];
  };
}