mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 18:04:41 +02:00
treewide: remove duplicate port settings
This commit is contained in:
parent
375424cb9f
commit
b6b9972d60
21 changed files with 58 additions and 143 deletions
|
@ -47,12 +47,6 @@ in
|
|||
'nextcloud' user.
|
||||
'';
|
||||
};
|
||||
exporterPort = mkOption {
|
||||
type = types.port;
|
||||
default = 9205;
|
||||
example = 8080;
|
||||
description = "Internal port for the exporter";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -102,7 +96,6 @@ in
|
|||
url = "https://cloud.${domain}";
|
||||
username = cfg.admin;
|
||||
passwordFile = cfg.exporterPasswordFile;
|
||||
port = cfg.exporterPort;
|
||||
};
|
||||
|
||||
prometheus.scrapeConfigs = [
|
||||
|
@ -110,7 +103,7 @@ in
|
|||
job_name = "nextcloud";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "localhost:${toString cfg.exporterPort}" ];
|
||||
targets = [ "localhost:${toString config.services.prometheus.exporters.nextcloud.port}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue