1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 03:27:45 +00:00

Add some parts of the nine host

This commit is contained in:
RGBCube 2025-01-24 23:50:51 +03:00
parent 6c108c7caa
commit fa80a17f59
12 changed files with 124 additions and 21 deletions

View file

@ -2,17 +2,17 @@
inherit (lib) enabled merge mkEnableOption mkIf mkOption types;
fakeSSHPort = 22;
in merge <| mkIf config.isServer {
config.services.prometheus.exporters.endlessh-go = enabled {
in {
config.services.prometheus.exporters.endlessh-go = mkIf config.isServer <| enabled {
listenAddress = "[::]";
};
# `services.endlessh-go.openFirewall` exposes both the Prometheus
# exporters port and the SSH port, and we don't want the metrics
# to leak, so we manually expose this like so.
config.networking.firewall.allowedTCPPorts = [ fakeSSHPort ];
config.networking.firewall.allowedTCPPorts = mkIf config.isServer <| [ fakeSSHPort ];
config.services.endlessh-go = enabled {
config.services.endlessh-go = mkIf config.isServer <| enabled {
listenAddress = "[::]";
port = fakeSSHPort;