feat(nixos): add tailscale module
This commit is contained in:
parent
343c802e6d
commit
7881c76f73
3 changed files with 63 additions and 0 deletions
17
nix/modules/networking/tailscale.nix
Normal file
17
nix/modules/networking/tailscale.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
inherit (config.flake.paths) secrets;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.default =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets."tailscale/client-secret".path;
|
||||
authKeyParameters.preauthorized = true;
|
||||
};
|
||||
persistDirs = [ "/var/lib/tailscale" ];
|
||||
sops.secrets."tailscale/client-secret".sopsFile = secrets + "/tailscale.yaml";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue