2024-08-20 21:32:35 +07:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.profile.services.navidrome;
|
|
|
|
user = config.profile.user;
|
|
|
|
inherit (lib) mkIf;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = mkIf cfg.enable {
|
2024-11-24 20:46:15 +07:00
|
|
|
services.nginx.virtualHosts."navidrome.tigor.web.id" = {
|
2024-11-24 21:31:04 +07:00
|
|
|
useACMEHost = "tigor.web.id";
|
2024-11-24 20:46:15 +07:00
|
|
|
forceSSL = true;
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
proxyPass = "http://0.0.0.0:${toString config.services.navidrome.settings.Port}";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-24 21:31:04 +07:00
|
|
|
security.acme.certs."tigor.web.id".extraDomainNames = [ "navidrome.tigor.web.id" ];
|
|
|
|
|
2024-08-20 21:32:35 +07:00
|
|
|
users.groups.navidrome.members = [ user.name ];
|
|
|
|
users.groups.${user.name}.members = [ "navidrome" ];
|
|
|
|
|
|
|
|
services.navidrome = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
Address = "0.0.0.0";
|
|
|
|
MusicFolder = "/nas/Syncthing/Sync/Music";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|