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

Alias services.prometheus.exporters.endlessh-go to services.endlessh-go.prometheus and make allowUnfree global

This commit is contained in:
RGBCube 2024-05-11 23:20:41 +03:00
parent c672670677
commit 6be5421a26
No known key found for this signature in database
5 changed files with 31 additions and 22 deletions

View file

@ -1,9 +1,5 @@
{ config, lib, pkgs, ... }: with lib; merge
(desktopSystemConfiguration {
nixpkgs.config.allowUnfree = true;
})
(desktopUserHomeConfiguration {
xdg.configFile."Vencord/settings/quickCss.css".text = config.theme.discordCss;
})

View file

@ -4,20 +4,25 @@ let
fakeSSHPort = 22;
prometheusPort = 9050;
in serverSystemConfiguration {
services.prometheus.scrapeConfigs = [{
job_name = "endlessh-go";
services.prometheus = {
exporters.endlessh-go = enabled {
listenAddress = "[::1]";
port = prometheusPort;
};
static_configs = [{
labels.job = "endlessh-go";
targets = [
"[::1]:${toString prometheusPort}"
];
scrapeConfigs = [{
job_name = "endlessh-go";
static_configs = [{
labels.job = "endlessh-go";
targets = [
"[::1]:${toString prometheusPort}"
];
}];
}];
}];
};
nixpkgs.config.allowUnfree = true; # For pkgs.clash-geoip.
# services.endlessh-go.openFirewall exposes both the Prometheus
# `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.
networking.firewall.allowedTCPPorts = [ fakeSSHPort ];
@ -31,10 +36,5 @@ in serverSystemConfiguration {
"-geoip_supplier max-mind-db"
"-max_mind_db ${pkgs.clash-geoip}/etc/clash/Country.mmdb"
];
prometheus = enabled {
listenAddress = "[::1]";
port = prometheusPort;
};
};
}

View file

@ -3,8 +3,6 @@
(desktopSystemConfiguration {
# Steam uses 32-bit drivers for some unholy fucking reason.
hardware.opengl.driSupport32Bit = true;
nixpkgs.config.allowUnfree = true;
})
(desktopUserHomePackages (with pkgs; [