mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Add endlessh-go
This commit is contained in:
parent
441f99d730
commit
c73ad40b7f
3 changed files with 33 additions and 9 deletions
|
@ -10,7 +10,7 @@ in serverSystemConfiguration {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.prometheus.scrapeConfigs = [{
|
services.prometheus.scrapeConfigs = [{
|
||||||
job_name = "mail";
|
job_name = "postfix";
|
||||||
|
|
||||||
static_configs = [{
|
static_configs = [{
|
||||||
labels.job = "postfix";
|
labels.job = "postfix";
|
||||||
|
|
32
modules/endlessh-go.nix
Normal file
32
modules/endlessh-go.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
{ ulib, ... }: with ulib;
|
|
||||||
|
|
||||||
serverSystemConfiguration {
|
|
||||||
services.endlessh = enabled {
|
|
||||||
openFirewall = true;
|
|
||||||
port = 22;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue