This commit is contained in:
Guanran Wang 2024-10-02 15:26:28 +08:00
parent 280edb17f7
commit cc5c19071b
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
3 changed files with 5 additions and 16 deletions

View file

@ -7,7 +7,7 @@
}:
let
inherit (config.lib) ports;
targets = lib.mapAttrsToList (_name: node: node.fqdn) nodes;
targets = lib.mapAttrsToList (_name: node: node.fqdn) nodes ++ [ "pek0.ny4.dev" ];
in
{
services.prometheus = {
@ -36,12 +36,7 @@ in
username = "prometheus";
password_file = config.sops.secrets."prometheus/auth".path;
};
static_configs = lib.singleton {
targets = [
"pek0.ny4.dev"
"tyo0.ny4.dev"
] ++ targets;
};
static_configs = lib.singleton { inherit targets; };
}
{
job_name = "caddy";
@ -50,12 +45,7 @@ in
username = "prometheus";
password_file = config.sops.secrets."prometheus/auth".path;
};
static_configs = lib.singleton {
targets = [
"tyo0.ny4.dev"
"pek0.ny4.dev"
] ++ targets;
};
static_configs = lib.singleton { inherit targets; };
}
{
job_name = "blackbox_exporter";

View file

@ -10,7 +10,6 @@
[
../../nixos/profiles/restic
../../nixos/profiles/sing-box
../../nixos/profiles/wireless
./anti-feature.nix
./disko.nix

View file

@ -1,6 +1,6 @@
{ config, ... }:
{ lib, config, ... }:
{
sops.secrets = builtins.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) {
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) {
"restic/environment" = { };
"restic/password" = { };
"restic/repository" = { };