machines/canopus: netbird service
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user