mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
chore: nf-fmt-nix
This commit is contained in:
parent
1d806cd552
commit
3099654a97
8 changed files with 297 additions and 257 deletions
|
|
@ -1,53 +1,57 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in {
|
||||
config = {
|
||||
services.prometheus.exporters = {
|
||||
node = mkMerge [
|
||||
{
|
||||
#enable = true;
|
||||
port = 9091;
|
||||
enabledCollectors = [
|
||||
"nfs"
|
||||
];
|
||||
}
|
||||
(mkIf config.services.nfs.server.enable {
|
||||
enabledCollectors = [
|
||||
"nfsd"
|
||||
];
|
||||
})
|
||||
(mkIf (!config.boot.isContainer) {
|
||||
enabledCollectors = [
|
||||
"nvme"
|
||||
"hwmon"
|
||||
];
|
||||
})
|
||||
{
|
||||
enabledCollectors = [
|
||||
"arp"
|
||||
"boottime"
|
||||
"cpu"
|
||||
"cpufreq"
|
||||
"diskstats"
|
||||
"dmi"
|
||||
"entropy"
|
||||
"filesystem"
|
||||
"netdev"
|
||||
"systemd"
|
||||
"sysctl"
|
||||
"systemd"
|
||||
"loadavg"
|
||||
"meminfo"
|
||||
"netstat"
|
||||
"os"
|
||||
"stat"
|
||||
"time"
|
||||
"uname"
|
||||
"vmstat"
|
||||
"zfs"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
in {
|
||||
config = {
|
||||
services.prometheus.exporters = {
|
||||
node = mkMerge [
|
||||
{
|
||||
#enable = true;
|
||||
port = 9091;
|
||||
enabledCollectors = [
|
||||
"nfs"
|
||||
];
|
||||
}
|
||||
(mkIf config.services.nfs.server.enable {
|
||||
enabledCollectors = [
|
||||
"nfsd"
|
||||
];
|
||||
})
|
||||
(mkIf (!config.boot.isContainer) {
|
||||
enabledCollectors = [
|
||||
"nvme"
|
||||
"hwmon"
|
||||
];
|
||||
})
|
||||
{
|
||||
enabledCollectors = [
|
||||
"arp"
|
||||
"boottime"
|
||||
"cpu"
|
||||
"cpufreq"
|
||||
"diskstats"
|
||||
"dmi"
|
||||
"entropy"
|
||||
"filesystem"
|
||||
"netdev"
|
||||
"systemd"
|
||||
"sysctl"
|
||||
"systemd"
|
||||
"loadavg"
|
||||
"meminfo"
|
||||
"netstat"
|
||||
"os"
|
||||
"stat"
|
||||
"time"
|
||||
"uname"
|
||||
"vmstat"
|
||||
"zfs"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,23 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) port;
|
||||
cfg = config.services.promtail;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) port;
|
||||
cfg = config.services.promtail;
|
||||
in {
|
||||
options.services.promtail.settings = {
|
||||
httpListenPort = mkOption {
|
||||
type = port;
|
||||
description = "Port to listen on over HTTP";
|
||||
default = 9094;
|
||||
};
|
||||
options.services.promtail.settings = {
|
||||
httpListenPort = mkOption {
|
||||
type = port;
|
||||
description = "Port to listen on over HTTP";
|
||||
default = 9094;
|
||||
};
|
||||
config.services.promtail = {
|
||||
extraFlags = [
|
||||
"--server.http-listen-port=${cfg.settings.httpListenPort}"
|
||||
];
|
||||
};
|
||||
}
|
||||
};
|
||||
config.services.promtail = {
|
||||
extraFlags = [
|
||||
"--server.http-listen-port=${cfg.settings.httpListenPort}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue