treewide: remove duplicate port settings

This commit is contained in:
Felix Buehler 2025-02-25 23:53:44 +01:00
parent 375424cb9f
commit b6b9972d60
21 changed files with 58 additions and 143 deletions

View file

@ -13,13 +13,6 @@ in
options.my.services.grafana = with lib; {
enable = mkEnableOption "Grafana for visualizing";
port = mkOption {
type = types.port;
default = 9500;
example = 3001;
description = "Internal port";
};
username = mkOption {
type = types.str;
default = "felix";
@ -42,7 +35,6 @@ in
server = {
domain = "visualization.${domain}";
root_url = "https://visualization.${domain}/";
http_port = cfg.port;
};
security = {
@ -69,7 +61,7 @@ in
job_name = "grafana";
static_configs = [
{
targets = [ "localhost:${toString cfg.port}" ];
targets = [ "localhost:${toString config.services.grafana.settings.server.http_port}" ];
labels = {
instance = config.networking.hostName;
};
@ -82,7 +74,7 @@ in
my.services.webserver.virtualHosts = [
{
subdomain = "visualization";
inherit (cfg) port;
port = config.services.grafana.settings.server.http_port;
}
];