mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-06-17 10:16:31 +05:30
32 lines
629 B
Nix
32 lines
629 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 = 51820;
|
|
login = {
|
|
enable = true;
|
|
setupKeyFile = config.sops.secrets.netbird-key.path;
|
|
};
|
|
bin.suffix = "";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|