music-assistant: move out of module
This commit is contained in:
parent
8d4f1eb419
commit
df7ebdb825
25
hosts/pi/music-assistant.nix
Normal file
25
hosts/pi/music-assistant.nix
Normal 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user