mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-29 17:29:18 -05:00
20 lines
441 B
Nix
20 lines
441 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
options = {
|
|
alyraffauf.services.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
|
|
};
|
|
|
|
config = lib.mkIf config.alyraffauf.services.tailscale.enable {
|
|
age.secrets.tailscaleAuthKey.file = ../../../secrets/tailscale/authKeyFile.age;
|
|
services.tailscale = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
authKeyFile = config.age.secrets.tailscaleAuthKey.path;
|
|
};
|
|
};
|
|
}
|