20 lines
406 B
Nix
Executable File
20 lines
406 B
Nix
Executable File
{ pkgs, config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.modules.system.tailscale;
|
|
authkey_file = config.sops.secrets."tailscale_authkey".path;
|
|
in
|
|
{
|
|
options.modules.system.tailscale = {
|
|
enable = lib.mkEnableOption "enables tailscale";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.tailscale = {
|
|
enable = true;
|
|
useRoutingFeatures = "server";
|
|
authKeyFile = authkey_file;
|
|
};
|
|
};
|
|
}
|