music-assistant: move out of module

This commit is contained in:
Jordan Holt 2025-03-10 16:27:25 +00:00
parent 8d4f1eb419
commit df7ebdb825
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
2 changed files with 25 additions and 37 deletions

View File

@ -0,0 +1,25 @@
{
config,
...
}:
{
services = {
nginx.virtualHosts."music-assistant.${config.networking.hostName}" = {
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:8095";
proxyWebsockets = true;
};
};
music-assistant = {
enable = true;
providers = [
"hass"
"jellyfin"
];
};
};
}

View File

@ -1,37 +0,0 @@
{
config,
lib,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
;
cfg = config.modules.services.music-assistant;
in
{
options.modules.services.music-assistant.enable = mkEnableOption "music-assistant";
config = mkIf cfg.enable {
services = {
nginx.virtualHosts."music-assistant.${config.networking.hostName}" = {
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:8095";
proxyWebsockets = true;
};
};
music-assistant = {
enable = true;
providers = [
"hass"
"jellyfin"
];
};
};
};
}