mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.services.tailscale: init
This commit is contained in:
18
modules/services/tailscale.nix
Normal file
18
modules/services/tailscale.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.tailscale = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) tailscale; in inputs.lib.mkIf (tailscale != null)
|
||||
{
|
||||
services.tailscale =
|
||||
{
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
disableTaildrop = true;
|
||||
# authKeyParameters should not be set
|
||||
authKeyFile = inputs.config.nixos.system.sops.secrets."tailscale".path;
|
||||
extraUpFlags = [ "--login-server=https://headscale.chn.moe" ];
|
||||
};
|
||||
nixos.system.sops.secrets."tailscale" = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user