mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
Alias services.prometheus.exporters.endlessh-go to services.endlessh-go.prometheus and make allowUnfree global
This commit is contained in:
parent
c672670677
commit
6be5421a26
5 changed files with 31 additions and 22 deletions
|
@ -101,6 +101,8 @@
|
|||
(filter (value: value ? overlays.default))
|
||||
(map (value: value.overlays.default))
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true; # IDGAF anymore.
|
||||
};
|
||||
|
||||
homeManagerModule = { lib, ... }: with lib; {
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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; [
|
||||
|
|
13
options/endlessh-go-exporter-alias.nix
Normal file
13
options/endlessh-go-exporter-alias.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
# And yes, I've tried lib.mkAliasOptionModule.
|
||||
# It doesn't work for a mysterious reason,
|
||||
# says it can't find `services.prometheus.exporters.endlessh-go`.
|
||||
#
|
||||
# This works, however.
|
||||
|
||||
{ config, lib, ... }: {
|
||||
options.services.prometheus.exporters.endlessh-go = lib.mkOption {
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.services.endlessh-go.prometheus = config.services.prometheus.exporters.endlessh-go;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue