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

@ -29,13 +29,6 @@ in
'';
};
port = mkOption {
type = types.port;
default = 4533;
example = 8080;
description = "Internal port for webui";
};
musicFolder = mkOption {
type = types.str;
example = "/mnt/music/";
@ -49,7 +42,6 @@ in
enable = true;
settings = cfg.settings // {
Port = cfg.port;
MusicFolder = cfg.musicFolder;
LogLevel = "info";
Prometheus.Enabled = config.services.prometheus.enable;
@ -62,7 +54,7 @@ in
job_name = "navidrome";
static_configs = [
{
targets = [ "localhost:${toString cfg.port}" ];
targets = [ "localhost:${toString config.services.navidrome.settings.Port}" ];
labels = {
instance = config.networking.hostName;
};
@ -92,7 +84,7 @@ in
my.services.webserver.virtualHosts = [
{
subdomain = "music";
inherit (cfg) port;
port = config.services.navidrome.settings.Port;
}
];