machines/canopus: netbird service

This commit is contained in:
2026-04-30 17:10:19 +07:00
parent a89a98d233
commit 898f9f9320
+39
View File
@@ -6,6 +6,7 @@
}: }:
let let
sitename = "glomerp.newedge.house"; sitename = "glomerp.newedge.house";
nbClientName = "netbird-b4l";
in in
{ {
imports = [ inputs.frappix.nixosModules.x86_64-linux.frappix ]; imports = [ inputs.frappix.nixosModules.x86_64-linux.frappix ];
@@ -36,6 +37,44 @@ in
''; '';
}; };
clan.core.vars.generators.netbird = {
files = {
setupKey = {
secret = true;
owner = config.services.netbird.clients.${nbClientName}.user.name;
group = config.services.netbird.clients.${nbClientName}.user.group;
};
managementURL.secret = false;
};
prompts = {
setupKey = {
type = "line";
persist = true;
description = "Setup Key to connect to the server";
};
};
script = ''
cat $prompts/setupKey > $out/setupKey
'';
};
services.netbird.enable = true;
services.netbird.clients.${nbClientName} = {
port = 51820;
config = {
ManagementURL = {
"Scheme" = "https";
"Host" = "netbird.b4l.co.th:443";
};
};
login = {
enable = true;
setupKeyFile = config.clan.core.vars.generators.netbird.files.setupKey.path;
};
};
services.frappe = { services.frappe = {
enable = true; enable = true;
project = "glomerp"; project = "glomerp";