2024-01-12 08:20:40 +01:00
|
|
|
{ inputs, config, lib, pkgs, modulesPath, hostname, ... }: {
|
2024-01-12 07:03:47 +01:00
|
|
|
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
|
|
|
|
# Set up the secrets file:
|
|
|
|
sops.secrets."tailscale_key" = {
|
|
|
|
owner = "root";
|
|
|
|
sopsFile = ../../../secrets/hosts/${hostname}.yaml;
|
|
|
|
restartUnits = [
|
|
|
|
"tailscaled.service"
|
|
|
|
"tailscaled-autoconnect.service"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
services.tailscale.authKeyFile = "/run/secrets/tailscale_key";
|
|
|
|
}
|