mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
treewide: avoid repetitive keys in attrSets
This commit is contained in:
parent
2a3f606557
commit
4b21221569
19 changed files with 994 additions and 947 deletions
|
@ -27,46 +27,48 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.blocky = {
|
||||
enable = true;
|
||||
services = {
|
||||
blocky = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
ports = {
|
||||
tls = "853";
|
||||
http = cfg.httpPort;
|
||||
};
|
||||
upstream = {
|
||||
default = [
|
||||
"dns2.digitalcourage.de2" # classic
|
||||
"tcp-tls:dns3.digitalcourage.de" # DoT
|
||||
"https://dns.digitale-gesellschaft.ch/dns-query" # DoH
|
||||
settings = {
|
||||
ports = {
|
||||
tls = "853";
|
||||
http = cfg.httpPort;
|
||||
};
|
||||
upstream = {
|
||||
default = [
|
||||
"dns2.digitalcourage.de2" # classic
|
||||
"tcp-tls:dns3.digitalcourage.de" # DoT
|
||||
"https://dns.digitale-gesellschaft.ch/dns-query" # DoH
|
||||
];
|
||||
};
|
||||
prometheus.enable = config.services.prometheus.enable;
|
||||
} // cfg.settings;
|
||||
};
|
||||
|
||||
prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "blocky";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString cfg.httpPort}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
prometheus.enable = config.services.prometheus.enable;
|
||||
} // cfg.settings;
|
||||
}
|
||||
];
|
||||
|
||||
# untested
|
||||
grafana.provision.dashboards.settings.providers = [
|
||||
{
|
||||
name = "Blocky";
|
||||
options.path = pkgs.grafana-dashboards.blocky;
|
||||
disableDeletion = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "blocky";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString cfg.httpPort}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# untested
|
||||
services.grafana.provision.dashboards.settings.providers = [
|
||||
{
|
||||
name = "Blocky";
|
||||
options.path = pkgs.grafana-dashboards.blocky;
|
||||
disableDeletion = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue