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

View file

@ -10,7 +10,6 @@
[ [
../../nixos/profiles/restic ../../nixos/profiles/restic
../../nixos/profiles/sing-box ../../nixos/profiles/sing-box
../../nixos/profiles/wireless
./anti-feature.nix ./anti-feature.nix
./disko.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/environment" = { };
"restic/password" = { }; "restic/password" = { };
"restic/repository" = { }; "restic/repository" = { };