mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-20 00:59:04 +05:30
29 lines
607 B
Nix
29 lines
607 B
Nix
{
|
|
flake.modules.nixos.networking = {
|
|
config,
|
|
lib,
|
|
hostName,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.tnix.networking.netbird-client;
|
|
in {
|
|
options.tnix.networking.netbird-client = {
|
|
enable = mkEnableOption "Enable netbird client";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.netbird.clients = {
|
|
${hostName} = {
|
|
port = 61820;
|
|
login = {
|
|
enable = true;
|
|
setupKeyFile = config.sops.secrets.netbird-key.path;
|
|
};
|
|
bin.suffix = "";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|