1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Add endlessh-go

This commit is contained in:
RGBCube 2024-01-15 14:51:40 +03:00
parent 441f99d730
commit c73ad40b7f
No known key found for this signature in database
3 changed files with 33 additions and 9 deletions

View file

@ -10,7 +10,7 @@ in serverSystemConfiguration {
};
services.prometheus.scrapeConfigs = [{
job_name = "mail";
job_name = "postfix";
static_configs = [{
labels.job = "postfix";

32
modules/endlessh-go.nix Normal file
View file

@ -0,0 +1,32 @@
{ config, ulib, pkgs, ... }: with ulib;
serverSystemConfiguration {
services.prometheus.scrapeConfigs = [{
job_name = "endlessh-go";
static_configs = [{
labels.job = "endlessh-go";
targets = [
"[::]:${toString config.services.endlessh-go.prometheus.port}"
];
}];
}];
nixpkgs.config.allowUnfree = true; # For pkgs.clash-geoip.
services.endlessh-go = enabled {
openFirewall = true;
port = 22;
extraOptions = [
"-alsologtostderr"
"-geoip_supplier max-mind-db"
"-max_mind_db ${pkgs.clash-geoip}/etc/clash/Country.mmdb"
];
prometheus = enabled {
listenAddress = "[::]";
port = 9050;
};
};
}

View file

@ -1,8 +0,0 @@
{ ulib, ... }: with ulib;
serverSystemConfiguration {
services.endlessh = enabled {
openFirewall = true;
port = 22;
};
}