Navidrome music server
This commit is contained in:
parent
c44366f5ce
commit
7a1053586d
2 changed files with 35 additions and 0 deletions
23
systems/x86_64-linux/stargate/services/navidrome.nix
Normal file
23
systems/x86_64-linux/stargate/services/navidrome.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
systemd.services.navidrome.serviceConfig.ExecStart = with lib; let
|
||||
cfg = config.services.navidrome;
|
||||
settingsFormat = pkgs.formats.toml {};
|
||||
in
|
||||
mkForce ''
|
||||
${pkgs.bash}/bin/bash -c "${getExe cfg.package} --configfile '${settingsFormat.generate "navidrome.toml" cfg.settings}'"
|
||||
'';
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Scanner.Schedule = "@every 24h";
|
||||
MusicFolder = "/zstorage/media/music";
|
||||
EnableSharing = true;
|
||||
BaseUrl = "https://music.kylekrein.com";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -67,6 +67,18 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
"music.kylekrein.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${toString config.services.navidrome.settings.Address}:${toString config.services.navidrome.settings.Port}";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
client_max_body_size 100M;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
"${config.services.nextcloud.hostName}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue