feat: netbird

This commit is contained in:
danny 2026-01-08 14:21:53 +08:00
parent 53b83b3471
commit ea118b7995
64 changed files with 1088 additions and 665 deletions

View file

@ -0,0 +1,31 @@
{
self,
config,
...
}:
let
serverCfg = self.nixosConfigurations.dn-server.config;
cfg = config.services.netbird;
domain = serverCfg.services.netbird.server.domain;
in
{
sops.secrets."netbird/wt0-setupKey" = {
owner = cfg.clients.wt0.user.name;
mode = "400";
};
services.netbird = {
clients.wt0 = {
openFirewall = true;
autoStart = true;
port = 51820;
environment = {
NB_MANAGEMENT_URL = "https://${domain}";
};
login = {
enable = true;
setupKeyFile = config.sops.secrets."netbird/wt0-setupKey".path;
};
};
};
}