nixos: services: servarr: starr: add 'port'

Now that declarative configurations are supported for those
applications.
This commit is contained in:
Bruno BELANYI 2025-03-31 11:12:16 +00:00
parent 8e6be43817
commit d783b5f5ee

View file

@ -15,12 +15,25 @@ in
enable = lib.mkEnableOption (lib.toSentenceCase starr) // { enable = lib.mkEnableOption (lib.toSentenceCase starr) // {
default = config.my.services.servarr.enableAll; default = config.my.services.servarr.enableAll;
}; };
port = mkOption {
type = types.port;
default = ports.${starr};
example = 8080;
description = "Internal port for webui";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.${starr} = { services.${starr} = {
enable = true; enable = true;
group = "media"; group = "media";
settings = {
server = {
port = cfg.port;
};
};
}; };
# Set-up media group # Set-up media group
@ -28,7 +41,7 @@ in
my.services.nginx.virtualHosts = { my.services.nginx.virtualHosts = {
${starr} = { ${starr} = {
port = ports.${starr}; port = cfg.port;
}; };
}; };