treewide: apply the new rfc nixfmt
This commit is contained in:
parent
e702d503b9
commit
7a795e5ed9
53 changed files with 1371 additions and 888 deletions
|
@ -3,9 +3,10 @@ let
|
|||
cfg = config.custom.prometheus;
|
||||
immichEnv = config.services.immich.environment;
|
||||
metricPort =
|
||||
if builtins.hasAttr "IMMICH_API_METRICS_PORT" immichEnv
|
||||
then immichEnv.IMMICH_API_METRICS_PORT
|
||||
else 8081;
|
||||
if builtins.hasAttr "IMMICH_API_METRICS_PORT" immichEnv then
|
||||
immichEnv.IMMICH_API_METRICS_PORT
|
||||
else
|
||||
8081;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.enable && cfg.exporters.immich.enable) {
|
||||
|
@ -16,9 +17,7 @@ in
|
|||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "immich";
|
||||
static_configs = [
|
||||
{ targets = [ "127.0.0.1:${toString metricPort}" ]; }
|
||||
];
|
||||
static_configs = [ { targets = [ "127.0.0.1:${toString metricPort}" ]; } ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue