mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-06-17 10:16:31 +05:30
feat(netbird): setup netbird client
This commit is contained in:
31
modules/nixos/networking/netbird-client.nix
Normal file
31
modules/nixos/networking/netbird-client.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
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 = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user