Initial commit, nodes are mostly done, panel is WIP
This commit is contained in:
aloslider committed 2026-11-17 10:47:39 +03:00
commit 67b1571e28
73 files changed
+3410

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
{ config, lib, ... }:
with lib;
let
cfg = config.vps.services.netbird;
hostName = config.networking.hostName;
in
{
imports = [ ./config.nix ];
options.vps.services.netbird = {
enable = mkEnableOption "netbird client";
};
config = mkIf cfg.enable {
services.netbird.clients.${hostName} = {
port = 51820;
openFirewall = false;
hardened = false;
login = {
enable = true;
setupKeyFile = config.sops.secrets."netbird/setup-key".path;
};
};
systemd.services."netbird-${hostName}" = {
after = [ "sops-nix.service" ];
wants = [ "sops-nix.service" ];
serviceConfig.EnvironmentFile = [ config.sops.templates."netbird.env".path ];
};
systemd.services."netbird-${hostName}-login" = {
after = [ "sops-nix.service" ];
wants = [ "sops-nix.service" ];
};
};
}